VirtualBox

Ignore:
Timestamp:
Nov 1, 2022 10:38:05 AM (2 years ago)
Author:
vboxsync
Message:

Backed out r154357,r154358,r154360,r154361,r154364 because it still doesn't build, old files weren't renamed or removed, and the changes for bugref:10180 and bugref:4787 got mixed up, making it difficult to selectively revert the latter one only.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/UnattendedImpl.cpp

    r97366 r97367  
    141141    bool            fMountOnly;
    142142    Utf8Str         strImagePath;
    143     bool            fAuxiliary;
    144143
    145144    UnattendedInstallationDisk(StorageBus_T a_enmBusType, Utf8Str const &a_rBusName, DeviceType_T a_enmDeviceType,
    146145                               AccessMode_T a_enmAccessType, LONG a_iPort, LONG a_iDevice, bool a_fMountOnly,
    147                                Utf8Str const &a_rImagePath, bool a_fAuxiliary)
     146                               Utf8Str const &a_rImagePath)
    148147        : enmBusType(a_enmBusType), strControllerName(a_rBusName), enmDeviceType(a_enmDeviceType), enmAccessType(a_enmAccessType)
    149         , iPort(a_iPort), iDevice(a_iDevice), fMountOnly(a_fMountOnly), strImagePath(a_rImagePath), fAuxiliary(a_fAuxiliary)
     148        , iPort(a_iPort), iDevice(a_iDevice), fMountOnly(a_fMountOnly), strImagePath(a_rImagePath)
    150149    {
    151150        Assert(strControllerName.length() > 0);
    152151    }
    153152
    154     UnattendedInstallationDisk(std::list<ControllerSlot>::const_iterator const &itDvdSlot, Utf8Str const &a_rImagePath,
    155                                bool a_fAuxiliary)
     153    UnattendedInstallationDisk(std::list<ControllerSlot>::const_iterator const &itDvdSlot, Utf8Str const &a_rImagePath)
    156154        : enmBusType(itDvdSlot->enmBus), strControllerName(itDvdSlot->strControllerName), enmDeviceType(DeviceType_DVD)
    157155        , enmAccessType(AccessMode_ReadOnly), iPort(itDvdSlot->iPort), iDevice(itDvdSlot->iDevice)
    158         , fMountOnly(!itDvdSlot->fFree), strImagePath(a_rImagePath), fAuxiliary(a_fAuxiliary)
     156        , fMountOnly(!itDvdSlot->fFree), strImagePath(a_rImagePath)
    159157    {
    160158        Assert(strControllerName.length() > 0);
     
    30543052                                                                 0, 0,
    30553053                                                                 fFoundPort0Dev0 /*fMountOnly*/,
    3056                                                                  mpInstaller->getAuxiliaryFloppyFilePath(), false));
     3054                                                                 mpInstaller->getAuxiliaryFloppyFilePath()));
    30573055    return S_OK;
    30583056}
     
    32133211    if (mpInstaller->isAuxiliaryIsoNeeded() && mpInstaller->bootFromAuxiliaryIso())
    32143212    {
    3215         rVecInstallatationDisks.push_back(UnattendedInstallationDisk(itDvdSlot, mpInstaller->getAuxiliaryIsoFilePath(), true));
     3213        rVecInstallatationDisks.push_back(UnattendedInstallationDisk(itDvdSlot, mpInstaller->getAuxiliaryIsoFilePath()));
    32163214        ++itDvdSlot;
    32173215    }
     
    32193217    if (mpInstaller->isOriginalIsoNeeded())
    32203218    {
    3221         rVecInstallatationDisks.push_back(UnattendedInstallationDisk(itDvdSlot, i_getIsoPath(), false));
     3219        rVecInstallatationDisks.push_back(UnattendedInstallationDisk(itDvdSlot, i_getIsoPath()));
    32223220        ++itDvdSlot;
    32233221    }
     
    32253223    if (mpInstaller->isAuxiliaryIsoNeeded() && !mpInstaller->bootFromAuxiliaryIso())
    32263224    {
    3227         rVecInstallatationDisks.push_back(UnattendedInstallationDisk(itDvdSlot, mpInstaller->getAuxiliaryIsoFilePath(), true));
     3225        rVecInstallatationDisks.push_back(UnattendedInstallationDisk(itDvdSlot, mpInstaller->getAuxiliaryIsoFilePath()));
    32283226        ++itDvdSlot;
    32293227    }
     
    32323230    if (mpInstaller->isAdditionsIsoNeeded())
    32333231    {
    3234         rVecInstallatationDisks.push_back(UnattendedInstallationDisk(itDvdSlot, i_getAdditionsIsoPath(), false));
     3232        rVecInstallatationDisks.push_back(UnattendedInstallationDisk(itDvdSlot, i_getAdditionsIsoPath()));
    32353233        ++itDvdSlot;
    32363234    }
     
    32383236    if (mpInstaller->isValidationKitIsoNeeded())
    32393237    {
    3240         rVecInstallatationDisks.push_back(UnattendedInstallationDisk(itDvdSlot, i_getValidationKitIsoPath(), false));
     3238        rVecInstallatationDisks.push_back(UnattendedInstallationDisk(itDvdSlot, i_getValidationKitIsoPath()));
    32413239        ++itDvdSlot;
    32423240    }
     
    42094207
    42104208    ComPtr<IMedium> ptrMedium;
    4211     HRESULT hrc = mParent->OpenMedium(Bstr(pImage->strImagePath).raw(),
    4212                                       pImage->enmDeviceType,
    4213                                       pImage->enmAccessType,
    4214                                       true,
    4215                                       ptrMedium.asOutParam());
    4216     LogRelFlowFunc(("VirtualBox::openMedium -> %Rhrc\n", hrc));
    4217     if (SUCCEEDED(hrc))
    4218     {
    4219         if (pImage->fAuxiliary && pImage->strImagePath.endsWith(".viso"))
    4220         {
    4221             hrc = ptrMedium->SetProperty(Bstr("UnattendedInstall").raw(), Bstr("1").raw());
    4222             LogRelFlowFunc(("Medium::SetProperty -> %Rhrc\n", hrc));
    4223         }
    4224 
     4209    HRESULT rc = mParent->OpenMedium(Bstr(pImage->strImagePath).raw(),
     4210                                     pImage->enmDeviceType,
     4211                                     pImage->enmAccessType,
     4212                                     true,
     4213                                     ptrMedium.asOutParam());
     4214    LogRelFlowFunc(("VirtualBox::openMedium -> %Rhrc\n", rc));
     4215    if (SUCCEEDED(rc))
     4216    {
    42254217        if (pImage->fMountOnly)
    42264218        {
    42274219            // mount the opened disk image
    4228             hrc = rPtrSessionMachine->MountMedium(Bstr(pImage->strControllerName).raw(), pImage->iPort,
    4229                                                   pImage->iDevice, ptrMedium, TRUE /*fForce*/);
    4230             LogRelFlowFunc(("Machine::MountMedium -> %Rhrc\n", hrc));
     4220            rc = rPtrSessionMachine->MountMedium(Bstr(pImage->strControllerName).raw(), pImage->iPort,
     4221                                                 pImage->iDevice, ptrMedium, TRUE /*fForce*/);
     4222            LogRelFlowFunc(("Machine::MountMedium -> %Rhrc\n", rc));
    42314223        }
    42324224        else
    42334225        {
    42344226            //attach the opened disk image to the controller
    4235             hrc = rPtrSessionMachine->AttachDevice(Bstr(pImage->strControllerName).raw(), pImage->iPort,
    4236                                                    pImage->iDevice, pImage->enmDeviceType, ptrMedium);
    4237             LogRelFlowFunc(("Machine::AttachDevice -> %Rhrc\n", hrc));
     4227            rc = rPtrSessionMachine->AttachDevice(Bstr(pImage->strControllerName).raw(), pImage->iPort,
     4228                                                  pImage->iDevice, pImage->enmDeviceType, ptrMedium);
     4229            LogRelFlowFunc(("Machine::AttachDevice -> %Rhrc\n", rc));
    42384230        }
    42394231    }
    42404232
    42414233    rLock.acquire();
    4242     return hrc;
     4234    return rc;
    42434235}
    42444236
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette