Changeset 42017 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Jul 4, 2012 9:19:44 AM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 78900
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp
r41347 r42017 1013 1013 if (fRemoveCtl) 1014 1014 { 1015 com::SafeIfaceArray<IMediumAttachment> mediumAttachments; 1016 1017 CHECK_ERROR(machine, 1018 GetMediumAttachmentsOfController(Bstr(pszCtl).raw(), 1019 ComSafeArrayAsOutParam(mediumAttachments))); 1020 for (size_t i = 0; i < mediumAttachments.size(); ++ i) 1021 { 1022 ComPtr<IMediumAttachment> mediumAttach = mediumAttachments[i]; 1023 LONG port = 0; 1024 LONG device = 0; 1025 1026 CHECK_ERROR(mediumAttach, COMGETTER(Port)(&port)); 1027 CHECK_ERROR(mediumAttach, COMGETTER(Device)(&device)); 1028 CHECK_ERROR(machine, DetachDevice(Bstr(pszCtl).raw(), port, device)); 1029 } 1030 1031 if (SUCCEEDED(rc)) 1032 CHECK_ERROR(machine, RemoveStorageController(Bstr(pszCtl).raw())); 1033 else 1034 errorArgument("Can't detach the devices connected to '%s' Controller\n" 1035 "and thus its removal failed.", pszCtl); 1015 CHECK_ERROR(machine, RemoveStorageController(Bstr(pszCtl).raw())); 1036 1016 } 1037 1017 else
Note:
See TracChangeset
for help on using the changeset viewer.