mirror of https://github.com/BOINC/boinc.git
VBOX: Clean-up Vbox 4.2/4.3/5.0 support.
This commit is contained in:
parent
228e82a4b7
commit
fc621bf1c8
|
@ -428,17 +428,16 @@ int VBOX_VM::create_vm() {
|
|||
// Tweak the VM's USB Configuration
|
||||
//
|
||||
vboxlog_msg("Disabling USB Support for VM.");
|
||||
#ifdef _VIRTUALBOX43_
|
||||
rc = pMachine->GetUSBControllerCountByType(USBControllerType_OHCI, &lOHCICtrls);
|
||||
if (SUCCEEDED(rc) && lOHCICtrls) {
|
||||
pMachine->RemoveUSBController(CComBSTR("OHCI"));
|
||||
}
|
||||
#endif
|
||||
#ifdef _VIRTUALBOX42_
|
||||
rc = pMachine->get_USBController(&pUSBContoller);
|
||||
if (SUCCEEDED(rc)) {
|
||||
pUSBContoller->put_Enabled(FALSE);
|
||||
}
|
||||
#else
|
||||
rc = pMachine->GetUSBControllerCountByType(USBControllerType_OHCI, &lOHCICtrls);
|
||||
if (SUCCEEDED(rc) && lOHCICtrls) {
|
||||
pMachine->RemoveUSBController(CComBSTR("OHCI"));
|
||||
}
|
||||
#endif
|
||||
|
||||
// Tweak the VM's COM Port Support
|
||||
|
@ -1007,16 +1006,15 @@ int VBOX_VM::deregister_vm(bool delete_media) {
|
|||
pMedium->Close();
|
||||
}
|
||||
|
||||
#ifdef _VIRTUALBOX43_
|
||||
pMachineRO->DeleteConfig(pEmptyHardDisks, &pProgress);
|
||||
#ifdef _VIRTUALBOX42_
|
||||
pMachineRO->Delete(pEmptyHardDisks, &pProgress);
|
||||
if (SUCCEEDED(rc)) {
|
||||
pProgress->WaitForCompletion(-1);
|
||||
} else {
|
||||
CHECK_ERROR(rc);
|
||||
}
|
||||
#endif
|
||||
#ifdef _VIRTUALBOX42_
|
||||
pMachineRO->Delete(pEmptyHardDisks, &pProgress);
|
||||
#else
|
||||
pMachineRO->DeleteConfig(pEmptyHardDisks, &pProgress);
|
||||
if (SUCCEEDED(rc)) {
|
||||
pProgress->WaitForCompletion(-1);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue