Changeset 37709 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Jun 30, 2011 1:51:51 PM (14 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r37543 r37709 466 466 " [--setparentuuid <uuid>]\n" 467 467 " [--passthrough on|off]\n" 468 " [--tempeject on|off]\n" 468 469 " [--bandwidthgroup <name>]\n" 469 470 " [--forceunmount]\n" -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp
r37674 r37709 52 52 { "--mtype", 'M', RTGETOPT_REQ_STRING }, 53 53 { "--passthrough", 'h', RTGETOPT_REQ_STRING }, 54 { "--tempeject", 'e', RTGETOPT_REQ_STRING }, 54 55 { "--bandwidthgroup", 'b', RTGETOPT_REQ_STRING }, 55 56 { "--forceunmount", 'f', RTGETOPT_REQ_NOTHING }, … … 84 85 const char *pszMedium = NULL; 85 86 const char *pszPassThrough = NULL; 87 const char *pszTempEject = NULL; 86 88 const char *pszBandwidthGroup = NULL; 87 89 Bstr bstrNewUuid; … … 162 164 if (ValueUnion.psz) 163 165 pszPassThrough = ValueUnion.psz; 166 else 167 rc = E_FAIL; 168 break; 169 } 170 171 case 'e': // tempeject <on|off> 172 { 173 if (ValueUnion.psz) 174 pszTempEject = ValueUnion.psz; 164 175 else 165 176 rc = E_FAIL; … … 682 693 } 683 694 695 if ( pszTempEject 696 && (SUCCEEDED(rc))) 697 { 698 ComPtr<IMediumAttachment> mattach; 699 CHECK_ERROR(machine, GetMediumAttachment(Bstr(pszCtl).raw(), port, 700 device, mattach.asOutParam())); 701 702 if (SUCCEEDED(rc)) 703 { 704 if (!RTStrICmp(pszTempEject, "on")) 705 { 706 CHECK_ERROR(machine, TemporaryEjectDevice(Bstr(pszCtl).raw(), 707 port, device, TRUE)); 708 } 709 else if (!RTStrICmp(pszTempEject, "off")) 710 { 711 CHECK_ERROR(machine, TemporaryEjectDevice(Bstr(pszCtl).raw(), 712 port, device, FALSE)); 713 } 714 else 715 throw Utf8StrFmt("Invalid --tempeject argument '%s'", pszTempEject); 716 } 717 else 718 throw Utf8StrFmt("Couldn't find the controller attachment for the controller '%s'\n", pszCtl); 719 } 720 684 721 if ( pszBandwidthGroup 685 722 && !fRunTime
Note:
See TracChangeset
for help on using the changeset viewer.