Changeset 38874 in vbox
- Timestamp:
- Sep 27, 2011 8:59:11 AM (13 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r38787 r38874 472 472 " [--tempeject on|off]\n" 473 473 " [--nonrotational on|off]\n" 474 " [--discard on|off]\n" 474 475 " [--bandwidthgroup <name>]\n" 475 476 " [--forceunmount]\n" -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp
r38330 r38874 54 54 { "--tempeject", 'e', RTGETOPT_REQ_STRING }, 55 55 { "--nonrotational", 'n', RTGETOPT_REQ_STRING }, 56 { "--discard", 'u', RTGETOPT_REQ_STRING }, 56 57 { "--bandwidthgroup", 'b', RTGETOPT_REQ_STRING }, 57 58 { "--forceunmount", 'f', RTGETOPT_REQ_NOTHING }, … … 88 89 const char *pszTempEject = NULL; 89 90 const char *pszNonRotational = NULL; 91 const char *pszDiscard = NULL; 90 92 const char *pszBandwidthGroup = NULL; 91 93 Bstr bstrNewUuid; … … 184 186 if (ValueUnion.psz) 185 187 pszNonRotational = ValueUnion.psz; 188 else 189 rc = E_FAIL; 190 break; 191 } 192 193 case 'u': // nonrotational <on|off> 194 { 195 if (ValueUnion.psz) 196 pszDiscard = ValueUnion.psz; 186 197 else 187 198 rc = E_FAIL; … … 796 807 } 797 808 809 if ( pszNonRotational 810 && (SUCCEEDED(rc))) 811 { 812 ComPtr<IMediumAttachment> mattach; 813 CHECK_ERROR(machine, GetMediumAttachment(Bstr(pszCtl).raw(), port, 814 device, mattach.asOutParam())); 815 816 if (SUCCEEDED(rc)) 817 { 818 if (!RTStrICmp(pszDiscard, "on")) 819 { 820 CHECK_ERROR(machine, DiscardDevice(Bstr(pszCtl).raw(), 821 port, device, TRUE)); 822 } 823 else if (!RTStrICmp(pszDiscard, "off")) 824 { 825 CHECK_ERROR(machine, DiscardDevice(Bstr(pszCtl).raw(), 826 port, device, FALSE)); 827 } 828 else 829 throw Utf8StrFmt("Invalid --nonrotational argument '%s'", pszNonRotational); 830 } 831 else 832 throw Utf8StrFmt("Couldn't find the controller attachment for the controller '%s'\n", pszCtl); 833 } 834 835 798 836 if ( pszBandwidthGroup 799 837 && !fRunTime
Note:
See TracChangeset
for help on using the changeset viewer.