Changeset 94218 in vbox for trunk/src/VBox
- Timestamp:
- Mar 14, 2022 9:02:16 AM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r94217 r94218 203 203 { "createhd", USAGE_S_NEWCMD, HELP_CMD_CREATEMEDIUM, handleCreateMedium, 0 }, /* backward compatibility */ 204 204 { "createvdi", USAGE_S_NEWCMD, HELP_CMD_CREATEMEDIUM, handleCreateMedium, 0 }, /* backward compatibility */ 205 { "modifymedium", USAGE_ MODIFYMEDIUM, VBMG_CMD_TODO, handleModifyMedium, 0 },206 { "modifyhd", USAGE_ MODIFYMEDIUM, VBMG_CMD_TODO, handleModifyMedium, 0 }, /* backward compatibility */207 { "modifyvdi", USAGE_ MODIFYMEDIUM, VBMG_CMD_TODO, handleModifyMedium, 0 }, /* backward compatibility */205 { "modifymedium", USAGE_S_NEWCMD, HELP_CMD_MODIFYMEDIUM, handleModifyMedium, 0 }, 206 { "modifyhd", USAGE_S_NEWCMD, HELP_CMD_MODIFYMEDIUM, handleModifyMedium, 0 }, /* backward compatibility */ 207 { "modifyvdi", USAGE_S_NEWCMD, HELP_CMD_MODIFYMEDIUM, handleModifyMedium, 0 }, /* backward compatibility */ 208 208 { "clonemedium", USAGE_S_NEWCMD, HELP_CMD_CLONEMEDIUM, handleCloneMedium, 0 }, 209 209 { "clonehd", USAGE_S_NEWCMD, HELP_CMD_CLONEMEDIUM, handleCloneMedium, 0 }, /* backward compatibility */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
r94217 r94218 98 98 { 99 99 USAGE_INVALID = 0, 100 USAGE_MODIFYMEDIUM,101 100 USAGE_CREATEHOSTIF, 102 101 USAGE_REMOVEHOSTIF, -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
r94203 r94218 699 699 case 'H': // disk 700 700 if (cmd != CMD_NONE) 701 return errorSyntax( USAGE_MODIFYMEDIUM,Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz);701 return errorSyntax(Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 702 702 cmd = CMD_DISK; 703 703 break; … … 705 705 case 'D': // DVD 706 706 if (cmd != CMD_NONE) 707 return errorSyntax( USAGE_MODIFYMEDIUM,Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz);707 return errorSyntax(Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 708 708 cmd = CMD_DVD; 709 709 break; … … 711 711 case 'L': // floppy 712 712 if (cmd != CMD_NONE) 713 return errorSyntax( USAGE_MODIFYMEDIUM,Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz);713 return errorSyntax(Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 714 714 cmd = CMD_FLOPPY; 715 715 break; … … 799 799 pszFilenameOrUuid = ValueUnion.psz; 800 800 else 801 return errorSyntax( USAGE_MODIFYMEDIUM,Disk::tr("Invalid parameter '%s'"), ValueUnion.psz);801 return errorSyntax(Disk::tr("Invalid parameter '%s'"), ValueUnion.psz); 802 802 break; 803 803 … … 806 806 { 807 807 if (RT_C_IS_PRINT(c)) 808 return errorSyntax( USAGE_MODIFYMEDIUM,Disk::tr("Invalid option -%c"), c);808 return errorSyntax(Disk::tr("Invalid option -%c"), c); 809 809 else 810 return errorSyntax( USAGE_MODIFYMEDIUM,Disk::tr("Invalid option case %i"), c);810 return errorSyntax(Disk::tr("Invalid option case %i"), c); 811 811 } 812 812 else if (c == VERR_GETOPT_UNKNOWN_OPTION) 813 return errorSyntax( USAGE_MODIFYMEDIUM,Disk::tr("unknown option: %s\n"), ValueUnion.psz);813 return errorSyntax(Disk::tr("unknown option: %s\n"), ValueUnion.psz); 814 814 else if (ValueUnion.pDef) 815 return errorSyntax( USAGE_MODIFYMEDIUM,"%s: %Rrs", ValueUnion.pDef->pszLong, c);815 return errorSyntax("%s: %Rrs", ValueUnion.pDef->pszLong, c); 816 816 else 817 return errorSyntax( USAGE_MODIFYMEDIUM,Disk::tr("error: %Rrs"), c);817 return errorSyntax(Disk::tr("error: %Rrs"), c); 818 818 } 819 819 } … … 823 823 824 824 if (!pszFilenameOrUuid) 825 return errorSyntax( USAGE_MODIFYMEDIUM,Disk::tr("Medium name or UUID required"));825 return errorSyntax(Disk::tr("Medium name or UUID required")); 826 826 827 827 if (!fModifyMediumType … … 834 834 && !fModifyDescription 835 835 ) 836 return errorSyntax( USAGE_MODIFYMEDIUM,Disk::tr("No operation specified"));836 return errorSyntax(Disk::tr("No operation specified")); 837 837 838 838 /* Always open the medium if necessary, there is no other way. */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r94217 r94218 584 584 "\n"); 585 585 586 const char *pcszSep1 = " ";587 const char *pcszSep2 = " ";588 if (enmCommand != USAGE_S_ALL)589 {590 pcszSep1 = "VBoxManage";591 pcszSep2 = "";592 }593 594 #define SEP pcszSep1, pcszSep2595 596 if (enmCommand == USAGE_MODIFYMEDIUM || enmCommand == USAGE_S_ALL)597 RTStrmPrintf(pStrm,598 "%s modifymedium %s [disk|dvd|floppy] <uuid|filename>\n"599 " [--type normal|writethrough|immutable|shareable|\n"600 " readonly|multiattach]\n"601 " [--autoreset on|off]\n"602 " [--property <name=[value]>]\n"603 " [--compact]\n"604 " [--resize <megabytes>|--resizebyte <bytes>]\n"605 " [--move <path>]\n"606 " [--setlocation <path>]\n"607 " [--description <description string>]"608 "\n", SEP);609 610 586 #ifndef VBOX_ONLY_DOCS /* Converted to man page, not needed. */ 611 587 if (enmCommand == USAGE_S_ALL)
Note:
See TracChangeset
for help on using the changeset viewer.