Changeset 94198 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 12, 2022 6:56:13 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r94197 r94198 200 200 { "mediumproperty", USAGE_MEDIUMPROPERTY, VBMG_CMD_TODO, handleMediumProperty, 0 }, 201 201 { "hdproperty", USAGE_MEDIUMPROPERTY, VBMG_CMD_TODO, handleMediumProperty, 0 }, /* backward compatibility */ 202 { "createmedium", USAGE_ CREATEMEDIUM, VBMG_CMD_TODO, handleCreateMedium, 0 },203 { "createhd", USAGE_ CREATEMEDIUM, VBMG_CMD_TODO, handleCreateMedium, 0 }, /* backward compatibility */204 { "createvdi", USAGE_ CREATEMEDIUM, VBMG_CMD_TODO, handleCreateMedium, 0 }, /* backward compatibility */202 { "createmedium", USAGE_S_NEWCMD, HELP_CMD_CREATEMEDIUM, handleCreateMedium, 0 }, 203 { "createhd", USAGE_S_NEWCMD, HELP_CMD_CREATEMEDIUM, handleCreateMedium, 0 }, /* backward compatibility */ 204 { "createvdi", USAGE_S_NEWCMD, HELP_CMD_CREATEMEDIUM, handleCreateMedium, 0 }, /* backward compatibility */ 205 205 { "modifymedium", USAGE_MODIFYMEDIUM, VBMG_CMD_TODO, handleModifyMedium, 0 }, 206 206 { "modifyhd", USAGE_MODIFYMEDIUM, VBMG_CMD_TODO, handleModifyMedium, 0 }, /* backward compatibility */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
r94197 r94198 98 98 { 99 99 USAGE_INVALID = 0, 100 USAGE_CREATEMEDIUM,101 100 USAGE_MODIFYMEDIUM, 102 101 USAGE_CLONEMEDIUM, -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
r94197 r94198 328 328 case 'H': // disk 329 329 if (cmd != CMD_NONE) 330 return errorSyntax( USAGE_CREATEMEDIUM,Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz);330 return errorSyntax(Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 331 331 cmd = CMD_DISK; 332 332 break; … … 334 334 case 'D': // DVD 335 335 if (cmd != CMD_NONE) 336 return errorSyntax( USAGE_CREATEMEDIUM,Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz);336 return errorSyntax(Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 337 337 cmd = CMD_DVD; 338 338 break; … … 340 340 case 'L': // floppy 341 341 if (cmd != CMD_NONE) 342 return errorSyntax( USAGE_CREATEMEDIUM,Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz);342 return errorSyntax(Disk::tr("Only one command can be specified: '%s'"), ValueUnion.psz); 343 343 cmd = CMD_FLOPPY; 344 344 break; … … 437 437 438 438 case VINF_GETOPT_NOT_OPTION: 439 return errorSyntax( USAGE_CREATEMEDIUM,Disk::tr("Invalid parameter '%s'"), ValueUnion.psz);439 return errorSyntax(Disk::tr("Invalid parameter '%s'"), ValueUnion.psz); 440 440 441 441 default: … … 443 443 { 444 444 if (RT_C_IS_PRINT(c)) 445 return errorSyntax( USAGE_CREATEMEDIUM,Disk::tr("Invalid option -%c"), c);445 return errorSyntax(Disk::tr("Invalid option -%c"), c); 446 446 else 447 return errorSyntax( USAGE_CREATEMEDIUM,Disk::tr("Invalid option case %i"), c);447 return errorSyntax(Disk::tr("Invalid option case %i"), c); 448 448 } 449 449 else if (c == VERR_GETOPT_UNKNOWN_OPTION) 450 return errorSyntax( USAGE_CREATEMEDIUM,Disk::tr("unknown option: %s\n"), ValueUnion.psz);450 return errorSyntax(Disk::tr("unknown option: %s\n"), ValueUnion.psz); 451 451 else if (ValueUnion.pDef) 452 return errorSyntax( USAGE_CREATEMEDIUM,"%s: %Rrs", ValueUnion.pDef->pszLong, c);452 return errorSyntax("%s: %Rrs", ValueUnion.pDef->pszLong, c); 453 453 else 454 return errorSyntax( USAGE_CREATEMEDIUM,Disk::tr("error: %Rrs"), c);454 return errorSyntax(Disk::tr("error: %Rrs"), c); 455 455 } 456 456 } … … 463 463 { 464 464 if (!filename || !*filename) 465 return errorSyntax( USAGE_CREATEMEDIUM,Disk::tr("Parameters --filename is required"));465 return errorSyntax(Disk::tr("Parameters --filename is required")); 466 466 if ((enmMediumVariant & MediumVariant_VmdkRawDisk) == 0 && size == 0) 467 return errorSyntax( USAGE_CREATEMEDIUM,Disk::tr("Parameters --size is required"));467 return errorSyntax(Disk::tr("Parameters --size is required")); 468 468 if (!format || !*format) 469 469 { … … 483 483 if ( !filename 484 484 || !*filename) 485 return errorSyntax( USAGE_CREATEMEDIUM,Disk::tr("Parameters --filename is required"));485 return errorSyntax(Disk::tr("Parameters --filename is required")); 486 486 size = 0; 487 487 if (cmd != CMD_DISK) 488 return errorSyntax( USAGE_CREATEMEDIUM,Disk::tr("Creating a differencing medium is only supported for hard disks"));488 return errorSyntax(Disk::tr("Creating a differencing medium is only supported for hard disks")); 489 489 enmMediumVariant = MediumVariant_Diff; 490 490 if (!format || !*format) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r94197 r94198 625 625 "\n", SEP); 626 626 627 if (enmCommand == USAGE_CREATEMEDIUM || enmCommand == USAGE_S_ALL)628 RTStrmPrintf(pStrm,629 "%s createmedium %s [disk|dvd|floppy] --filename <filename>\n"630 " [--size <megabytes>|--sizebyte <bytes>]\n"631 " [--diffparent <uuid>|<filename>]\n"632 " [--format VDI|VMDK|VHD] (default: VDI)]\n"633 " [--variant Standard,Fixed,Split2G,Stream,ESX,\n"634 " Formatted,RawDisk]\n"635 " [[--property <name>=<value>] --property <name>=<value>\n"636 " --property-file <name>=</path/to/file/with/value>]...\n"637 "\n", SEP);638 639 627 if (enmCommand == USAGE_MODIFYMEDIUM || enmCommand == USAGE_S_ALL) 640 628 RTStrmPrintf(pStrm,
Note:
See TracChangeset
for help on using the changeset viewer.