Changeset 97363 in vbox for trunk/src/VBox/Main
- Timestamp:
- Nov 1, 2022 7:23:25 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/UnattendedImpl.cpp
r97362 r97363 4209 4209 4210 4210 ComPtr<IMedium> ptrMedium; 4211 HRESULT rc = mParent->OpenMedium(Bstr(pImage->strImagePath).raw(),4212 pImage->enmDeviceType,4213 pImage->enmAccessType,4214 true,4215 ptrMedium.asOutParam());4216 LogRelFlowFunc(("VirtualBox::openMedium -> %Rhrc\n", rc));4217 if (SUCCEEDED( rc))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 4218 { 4219 4219 if (pImage->fAuxiliary && pImage->strImagePath.endsWith(".viso")) 4220 4220 { 4221 rc = ptrMedium->SetProperty(Bstr(L"UnattendedInstall").raw(), Bstr(L"1").raw());4222 LogRelFlowFunc(("Medium::SetProperty -> %Rhrc\n", rc));4221 hrc = ptrMedium->SetProperty(Bstr(L"UnattendedInstall").raw(), Bstr(L"1").raw()); 4222 LogRelFlowFunc(("Medium::SetProperty -> %Rhrc\n", hrc)); 4223 4223 } 4224 4224 … … 4226 4226 { 4227 4227 // mount the opened disk image 4228 rc = rPtrSessionMachine->MountMedium(Bstr(pImage->strControllerName).raw(), pImage->iPort,4229 pImage->iDevice, ptrMedium, TRUE /*fForce*/);4230 LogRelFlowFunc(("Machine::MountMedium -> %Rhrc\n", rc));4228 hrc = rPtrSessionMachine->MountMedium(Bstr(pImage->strControllerName).raw(), pImage->iPort, 4229 pImage->iDevice, ptrMedium, TRUE /*fForce*/); 4230 LogRelFlowFunc(("Machine::MountMedium -> %Rhrc\n", hrc)); 4231 4231 } 4232 4232 else 4233 4233 { 4234 4234 //attach the opened disk image to the controller 4235 rc = rPtrSessionMachine->AttachDevice(Bstr(pImage->strControllerName).raw(), pImage->iPort,4236 pImage->iDevice, pImage->enmDeviceType, ptrMedium);4237 LogRelFlowFunc(("Machine::AttachDevice -> %Rhrc\n", rc));4235 hrc = rPtrSessionMachine->AttachDevice(Bstr(pImage->strControllerName).raw(), pImage->iPort, 4236 pImage->iDevice, pImage->enmDeviceType, ptrMedium); 4237 LogRelFlowFunc(("Machine::AttachDevice -> %Rhrc\n", hrc)); 4238 4238 } 4239 4239 } 4240 4240 4241 4241 rLock.acquire(); 4242 return rc;4242 return hrc; 4243 4243 } 4244 4244
Note:
See TracChangeset
for help on using the changeset viewer.