Changeset 42460 in vbox for trunk/src/VBox
- Timestamp:
- Jul 30, 2012 8:37:10 PM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
r42444 r42460 183 183 184 184 /* VBoxManageGuestProp.cpp */ 185 extern void usageGuestProperty(PRTSTREAM pStrm );185 extern void usageGuestProperty(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2); 186 186 187 187 /* VBoxManageGuestCtrl.cpp */ 188 extern void usageGuestControl(PRTSTREAM pStrm );188 extern void usageGuestControl(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2); 189 189 190 190 #ifndef VBOX_ONLY_DOCS -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
r42445 r42460 218 218 #endif /* VBOX_ONLY_DOCS */ 219 219 220 void usageGuestControl(PRTSTREAM pStrm )220 void usageGuestControl(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2) 221 221 { 222 222 RTStrmPrintf(pStrm, 223 "VBoxManage guestcontrol<vmname>|<uuid>\n"223 "%s guestcontrol %s <vmname>|<uuid>\n" 224 224 " exec[ute]\n" 225 225 " --image <path to program> --username <name>\n" … … 255 255 " updateadditions\n" 256 256 " [--source <guest additions .ISO>] [--verbose]\n" 257 "\n" );257 "\n", pcszSep1, pcszSep2); 258 258 } 259 259 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp
r39821 r42460 53 53 #endif /* !VBOX_ONLY_DOCS */ 54 54 55 void usageGuestProperty(PRTSTREAM pStrm )55 void usageGuestProperty(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2) 56 56 { 57 57 RTStrmPrintf(pStrm, 58 "VBoxManage guestpropertyget <vmname>|<uuid>\n"58 "%s guestproperty %s get <vmname>|<uuid>\n" 59 59 " <property> [--verbose]\n" 60 "\n" );60 "\n", pcszSep1, pcszSep2); 61 61 RTStrmPrintf(pStrm, 62 "VBoxManage guestpropertyset <vmname>|<uuid>\n"62 "%s guestproperty %s set <vmname>|<uuid>\n" 63 63 " <property> [<value> [--flags <flags>]]\n" 64 "\n" );64 "\n", pcszSep1, pcszSep2); 65 65 RTStrmPrintf(pStrm, 66 "VBoxManage guestpropertyenumerate <vmname>|<uuid>\n"66 "%s guestproperty %s enumerate <vmname>|<uuid>\n" 67 67 " [--patterns <patterns>]\n" 68 "\n" );68 "\n", pcszSep1, pcszSep2); 69 69 RTStrmPrintf(pStrm, 70 "VBoxManage guestpropertywait <vmname>|<uuid> <patterns>\n"70 "%s guestproperty %s wait <vmname>|<uuid> <patterns>\n" 71 71 " [--timeout <msec>] [--fail-on-timeout]\n" 72 "\n" );72 "\n", pcszSep1, pcszSep2); 73 73 } 74 74 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r42445 r42460 99 99 if (u64Cmd == USAGE_ALL) 100 100 RTStrmPrintf(pStrm, 101 "VBoxManage [-v|--version] print version number and exit\n" 102 "VBoxManage [-q|--nologo] ... suppress the logo\n" 103 "VBoxManage [--settingspw <pw>] ...\n" 104 "VBoxManage [--settingspwfile] ... provide the settings password\n" 105 "\n"); 101 " VBoxManage [<general option>] <command>\n" 102 " \n \n" 103 "General Options:\n \n" 104 " [-v|--version] print version number and exit\n" 105 " [-q|--nologo] suppress the logo\n" 106 " [--settingspw <pw>] provide the settings password\n" 107 " [--settingspwfile <file>] provide a file containing the settings password\n" 108 " \n \n" 109 "Commands:\n \n"); 110 111 const char *pcszSep1 = " "; 112 const char *pcszSep2 = " "; 113 if (u64Cmd != USAGE_ALL) 114 { 115 pcszSep1 = "VBoxManage"; 116 pcszSep2 = ""; 117 } 118 119 #define SEP pcszSep1, pcszSep2 106 120 107 121 if (u64Cmd & USAGE_LIST) 108 122 RTStrmPrintf(pStrm, 109 "VBoxManage list [--long|-l]vms|runningvms|ostypes|hostdvds|hostfloppies|\n"123 "%s list [--long|-l]%s vms|runningvms|ostypes|hostdvds|hostfloppies|\n" 110 124 #if defined(VBOX_WITH_NETFLT) 111 125 " bridgedifs|hostonlyifs|dhcpservers|hostinfo|\n" … … 116 130 " usbhost|usbfilters|systemproperties|extpacks|\n" 117 131 " groups\n" 118 "\n" );132 "\n", SEP); 119 133 120 134 if (u64Cmd & USAGE_SHOWVMINFO) 121 135 RTStrmPrintf(pStrm, 122 "VBoxManage showvminfo<uuid>|<name> [--details]\n"136 "%s showvminfo %s <uuid>|<name> [--details]\n" 123 137 " [--machinereadable]\n" 124 "VBoxManage showvminfo<uuid>|<name> --log <idx>\n"125 "\n" );138 "%s showvminfo %s <uuid>|<name> --log <idx>\n" 139 "\n", SEP, SEP); 126 140 127 141 if (u64Cmd & USAGE_REGISTERVM) 128 142 RTStrmPrintf(pStrm, 129 "VBoxManage registervm<filename>\n"130 "\n" );143 "%s registervm %s <filename>\n" 144 "\n", SEP); 131 145 132 146 if (u64Cmd & USAGE_UNREGISTERVM) 133 147 RTStrmPrintf(pStrm, 134 "VBoxManage unregistervm<uuid>|<name> [--delete]\n"135 "\n" );148 "%s unregistervm %s <uuid>|<name> [--delete]\n" 149 "\n", SEP); 136 150 137 151 if (u64Cmd & USAGE_CREATEVM) 138 152 RTStrmPrintf(pStrm, 139 "VBoxManage createvm--name <name>\n"153 "%s createvm %s --name <name>\n" 140 154 " [--groups <group>, ...]\n" 141 155 " [--ostype <ostype>]\n" … … 143 157 " [--basefolder <path>]\n" 144 158 " [--uuid <uuid>]\n" 145 "\n" );159 "\n", SEP); 146 160 147 161 if (u64Cmd & USAGE_MODIFYVM) 148 162 { 149 163 RTStrmPrintf(pStrm, 150 "VBoxManage modifyvm<uuid|name>\n"164 "%s modifyvm %s <uuid|name>\n" 151 165 " [--name <name>]\n" 152 166 " [--groups <group>, ...]\n" … … 255 269 " [--guestmemoryballoon <balloonsize in MB>]\n" 256 270 " [--gueststatisticsinterval <seconds>]\n" 257 " [--audio none|null" );271 " [--audio none|null", SEP); 258 272 if (fWin) 259 273 { … … 354 368 if (u64Cmd & USAGE_CLONEVM) 355 369 RTStrmPrintf(pStrm, 356 "VBoxManage clonevm<uuid>|<name>\n"370 "%s clonevm %s <uuid>|<name>\n" 357 371 " [--snapshot <uuid>|<name>]\n" 358 372 " [--mode machine|machineandchildren|all]\n" … … 364 378 " [--uuid <uuid>]\n" 365 379 " [--register]\n" 366 "\n" );380 "\n", SEP); 367 381 368 382 if (u64Cmd & USAGE_IMPORTAPPLIANCE) 369 383 RTStrmPrintf(pStrm, 370 "VBoxManage import<ovf/ova>\n"384 "%s import %s <ovf/ova>\n" 371 385 " [--dry-run|-n]\n" 372 386 " [--options keepallmacs|keepnatmacs]\n" 373 387 " [more options]\n" 374 388 " (run with -n to have options displayed\n" 375 " for a particular OVF)\n\n" );389 " for a particular OVF)\n\n", SEP); 376 390 377 391 if (u64Cmd & USAGE_EXPORTAPPLIANCE) 378 392 RTStrmPrintf(pStrm, 379 "VBoxManage export<machines> --output|-o <name>.<ovf/ova>\n"393 "%s export %s <machines> --output|-o <name>.<ovf/ova>\n" 380 394 " [--legacy09|--ovf09|--ovf10|--ovf20]\n" 381 395 " [--manifest]\n" … … 388 402 " [--eula <license text>]\n" 389 403 " [--eulafile <filename>]\n" 390 "\n" );404 "\n", SEP); 391 405 392 406 if (u64Cmd & USAGE_STARTVM) 393 407 { 394 408 RTStrmPrintf(pStrm, 395 "VBoxManage startvm <uuid>|<name>...\n"); 396 RTStrmPrintf(pStrm, 397 " [--type gui"); 409 "%s startvm %s <uuid>|<name>...\n" 410 " [--type gui", SEP); 398 411 if (fVBoxSDL) 399 412 RTStrmPrintf(pStrm, "|sdl"); … … 406 419 { 407 420 RTStrmPrintf(pStrm, 408 "VBoxManage controlvm<uuid>|<name>\n"421 "%s controlvm %s <uuid>|<name>\n" 409 422 " pause|resume|reset|poweroff|savestate|\n" 410 423 " acpipowerbutton|acpisleepbutton|\n" … … 451 464 " unplugcpu <id>\n" 452 465 " cpuexecutioncap <1-100>\n" 453 "\n" );466 "\n", SEP); 454 467 } 455 468 456 469 if (u64Cmd & USAGE_DISCARDSTATE) 457 470 RTStrmPrintf(pStrm, 458 "VBoxManage discardstate<uuid>|<name>\n"459 "\n" );471 "%s discardstate %s <uuid>|<name>\n" 472 "\n", SEP); 460 473 461 474 if (u64Cmd & USAGE_ADOPTSTATE) 462 475 RTStrmPrintf(pStrm, 463 "VBoxManage adoptstate<uuid>|<name> <state_file>\n"464 "\n" );476 "%s adoptstate %s <uuid>|<name> <state_file>\n" 477 "\n", SEP); 465 478 466 479 if (u64Cmd & USAGE_SNAPSHOT) 467 480 RTStrmPrintf(pStrm, 468 "VBoxManage snapshot<uuid>|<name>\n"481 "%s snapshot %s <uuid>|<name>\n" 469 482 " take <name> [--description <desc>] [--pause] |\n" 470 483 " delete <uuid>|<name> |\n" … … 476 489 " list [--details|--machinereadable]\n" 477 490 " showvminfo <uuid>|<name>\n" 478 "\n" );491 "\n", SEP); 479 492 480 493 if (u64Cmd & USAGE_CLOSEMEDIUM) 481 494 RTStrmPrintf(pStrm, 482 "VBoxManage closemediumdisk|dvd|floppy <uuid>|<filename>\n"495 "%s closemedium %s disk|dvd|floppy <uuid>|<filename>\n" 483 496 " [--delete]\n" 484 "\n" );497 "\n", SEP); 485 498 486 499 if (u64Cmd & USAGE_STORAGEATTACH) 487 500 RTStrmPrintf(pStrm, 488 "VBoxManage storageattach<uuid|vmname>\n"501 "%s storageattach %s <uuid|vmname>\n" 489 502 " --storagectl <name>\n" 490 503 " [--port <number>]\n" … … 513 526 " [--initiator <initiator>]\n" 514 527 " [--intnet]\n" 515 "\n" );528 "\n", SEP); 516 529 517 530 if (u64Cmd & USAGE_STORAGECONTROLLER) 518 531 RTStrmPrintf(pStrm, 519 "VBoxManage storagectl<uuid|vmname>\n"532 "%s storagectl %s <uuid|vmname>\n" 520 533 " --name <name>\n" 521 534 " [--add ide|sata|scsi|floppy|sas]\n" … … 527 540 " [--bootable on|off]\n" 528 541 " [--remove]\n" 529 "\n" );542 "\n", SEP); 530 543 531 544 if (u64Cmd & USAGE_BANDWIDTHCONTROL) 532 545 RTStrmPrintf(pStrm, 533 "VBoxManage bandwidthctl<uuid|vmname>\n"546 "%s bandwidthctl %s <uuid|vmname>\n" 534 547 " add <name> --type disk|network\n" 535 548 " --limit <megabytes per second>[k|m|g|K|M|G] |\n" … … 540 553 " (limit units: k=kilobit, m=megabit, g=gigabit,\n" 541 554 " K=kilobyte, M=megabyte, G=gigabyte)\n" 542 "\n" );555 "\n", SEP); 543 556 544 557 if (u64Cmd & USAGE_SHOWHDINFO) 545 558 RTStrmPrintf(pStrm, 546 "VBoxManage showhdinfo<uuid>|<filename>\n"547 "\n" );559 "%s showhdinfo %s <uuid>|<filename>\n" 560 "\n", SEP); 548 561 549 562 if (u64Cmd & USAGE_CREATEHD) 550 563 RTStrmPrintf(pStrm, 551 "VBoxManage createhd--filename <filename>\n"564 "%s createhd %s --filename <filename>\n" 552 565 " [--size <megabytes>|--sizebyte <bytes>]\n" 553 566 " [--diffparent <uuid>|<filename>\n" 554 567 " [--format VDI|VMDK|VHD] (default: VDI)\n" 555 568 " [--variant Standard,Fixed,Split2G,Stream,ESX]\n" 556 "\n" );569 "\n", SEP); 557 570 558 571 if (u64Cmd & USAGE_MODIFYHD) 559 572 RTStrmPrintf(pStrm, 560 "VBoxManage modifyhd<uuid>|<filename>\n"573 "%s modifyhd %s <uuid>|<filename>\n" 561 574 " [--type normal|writethrough|immutable|shareable|\n" 562 575 " readonly|multiattach]\n" … … 564 577 " [--compact]\n" 565 578 " [--resize <megabytes>|--resizebyte <bytes>]\n" 566 "\n" );579 "\n", SEP); 567 580 568 581 if (u64Cmd & USAGE_CLONEHD) 569 582 RTStrmPrintf(pStrm, 570 "VBoxManage clonehd<uuid>|<filename> <uuid>|<outputfile>\n"583 "%s clonehd %s <uuid>|<filename> <uuid>|<outputfile>\n" 571 584 " [--format VDI|VMDK|VHD|RAW|<other>]\n" 572 585 " [--variant Standard,Fixed,Split2G,Stream,ESX]\n" 573 586 " [--existing]\n" 574 "\n" );587 "\n", SEP); 575 588 576 589 if (u64Cmd & USAGE_CONVERTFROMRAW) 577 590 RTStrmPrintf(pStrm, 578 "VBoxManage convertfromraw<filename> <outputfile>\n"591 "%s convertfromraw %s <filename> <outputfile>\n" 579 592 " [--format VDI|VMDK|VHD]\n" 580 593 " [--variant Standard,Fixed,Split2G,Stream,ESX]\n" 581 594 " [--uuid <uuid>]\n" 582 "VBoxManage convertfromrawstdin <outputfile> <bytes>\n"595 "%s convertfromraw %s stdin <outputfile> <bytes>\n" 583 596 " [--format VDI|VMDK|VHD]\n" 584 597 " [--variant Standard,Fixed,Split2G,Stream,ESX]\n" 585 598 " [--uuid <uuid>]\n" 586 "\n" );599 "\n", SEP, SEP); 587 600 588 601 if (u64Cmd & USAGE_GETEXTRADATA) 589 602 RTStrmPrintf(pStrm, 590 "VBoxManage getextradataglobal|<uuid>|<name>\n"603 "%s getextradata %s global|<uuid>|<name>\n" 591 604 " <key>|enumerate\n" 592 "\n" );605 "\n", SEP); 593 606 594 607 if (u64Cmd & USAGE_SETEXTRADATA) 595 608 RTStrmPrintf(pStrm, 596 "VBoxManage setextradataglobal|<uuid>|<name>\n"609 "%s setextradata %s global|<uuid>|<name>\n" 597 610 " <key>\n" 598 611 " [<value>] (no value deletes key)\n" 599 "\n" );612 "\n", SEP); 600 613 601 614 if (u64Cmd & USAGE_SETPROPERTY) 602 615 RTStrmPrintf(pStrm, 603 "VBoxManage setpropertymachinefolder default|<folder> |\n"616 "%s setproperty %s machinefolder default|<folder> |\n" 604 617 " vrdeauthlibrary default|<library> |\n" 605 618 " websrvauthlibrary default|null|<library> |\n" … … 607 620 " autostartdbpath null|<folder> |\n" 608 621 " loghistorycount <value>\n" 609 "\n" );622 "\n", SEP); 610 623 611 624 if (u64Cmd & USAGE_USBFILTER_ADD) 612 625 RTStrmPrintf(pStrm, 613 "VBoxManage usbfilteradd <index,0-N>\n"626 "%s usbfilter %s add <index,0-N>\n" 614 627 " --target <uuid>|<name>|global\n" 615 628 " --name <string>\n" … … 624 637 " [--serialnumber <string>] (null)\n" 625 638 " [--maskedinterfaces <XXXXXXXX>]\n" 626 "\n" );639 "\n", SEP); 627 640 628 641 if (u64Cmd & USAGE_USBFILTER_MODIFY) 629 642 RTStrmPrintf(pStrm, 630 "VBoxManage usbfiltermodify <index,0-N>\n"643 "%s usbfilter %s modify <index,0-N>\n" 631 644 " --target <uuid>|<name>|global\n" 632 645 " [--name <string>]\n" … … 641 654 " [--serialnumber <string>|\"\"]\n" 642 655 " [--maskedinterfaces <XXXXXXXX>]\n" 643 "\n" );656 "\n", SEP); 644 657 645 658 if (u64Cmd & USAGE_USBFILTER_REMOVE) 646 659 RTStrmPrintf(pStrm, 647 "VBoxManage usbfilterremove <index,0-N>\n"660 "%s usbfilter %s remove <index,0-N>\n" 648 661 " --target <uuid>|<name>|global\n" 649 "\n" );662 "\n", SEP); 650 663 651 664 if (u64Cmd & USAGE_SHAREDFOLDER_ADD) 652 665 RTStrmPrintf(pStrm, 653 "VBoxManage sharedfolderadd <vmname>|<uuid>\n"666 "%s sharedfolder %s add <vmname>|<uuid>\n" 654 667 " --name <name> --hostpath <hostpath>\n" 655 668 " [--transient] [--readonly] [--automount]\n" 656 "\n" );669 "\n", SEP); 657 670 658 671 if (u64Cmd & USAGE_SHAREDFOLDER_REMOVE) 659 672 RTStrmPrintf(pStrm, 660 "VBoxManage sharedfolderremove <vmname>|<uuid>\n"673 "%s sharedfolder %s remove <vmname>|<uuid>\n" 661 674 " --name <name> [--transient]\n" 662 "\n" );675 "\n", SEP); 663 676 664 677 #ifdef VBOX_WITH_GUEST_PROPS 665 678 if (u64Cmd & USAGE_GUESTPROPERTY) 666 usageGuestProperty(pStrm );679 usageGuestProperty(pStrm, SEP); 667 680 #endif /* VBOX_WITH_GUEST_PROPS defined */ 668 681 669 682 #ifdef VBOX_WITH_GUEST_CONTROL 670 683 if (u64Cmd & USAGE_GUESTCONTROL) 671 usageGuestControl(pStrm );684 usageGuestControl(pStrm, SEP); 672 685 #endif /* VBOX_WITH_GUEST_CONTROL defined */ 673 686 … … 675 688 { 676 689 RTStrmPrintf(pStrm, 677 "VBoxManage debugvm<uuid>|<name>\n"690 "%s debugvm %s <uuid>|<name>\n" 678 691 " dumpguestcore --filename <name> |\n" 679 692 " info <item> [args] |\n" … … 692 705 " statistics [--reset] [--pattern <pattern>]\n" 693 706 " [--descriptions]\n" 694 "\n" );707 "\n", SEP); 695 708 } 696 709 if (u64Cmd & USAGE_METRICS) 697 710 RTStrmPrintf(pStrm, 698 "VBoxManage metricslist [*|host|<vmname> [<metric_list>]]\n"711 "%s metrics %s list [*|host|<vmname> [<metric_list>]]\n" 699 712 " (comma-separated)\n\n" 700 "VBoxManage metricssetup\n"713 "%s metrics %s setup\n" 701 714 " [--period <seconds>] (default: 1)\n" 702 715 " [--samples <count>] (default: 1)\n" 703 716 " [--list]\n" 704 717 " [*|host|<vmname> [<metric_list>]]\n\n" 705 "VBoxManage metricsquery [*|host|<vmname> [<metric_list>]]\n\n"706 "VBoxManage metricsenable\n"718 "%s metrics %s query [*|host|<vmname> [<metric_list>]]\n\n" 719 "%s metrics %s enable\n" 707 720 " [--list]\n" 708 721 " [*|host|<vmname> [<metric_list>]]\n\n" 709 "VBoxManage metricsdisable\n"722 "%s metrics %s disable\n" 710 723 " [--list]\n" 711 724 " [*|host|<vmname> [<metric_list>]]\n\n" 712 "VBoxManage metricscollect\n"725 "%s metrics %s collect\n" 713 726 " [--period <seconds>] (default: 1)\n" 714 727 " [--samples <count>] (default: 1)\n" … … 716 729 " [--detach]\n" 717 730 " [*|host|<vmname> [<metric_list>]]\n" 718 "\n" );731 "\n", SEP, SEP, SEP, SEP, SEP, SEP); 719 732 720 733 #if defined(VBOX_WITH_NETFLT) … … 722 735 { 723 736 RTStrmPrintf(pStrm, 724 "VBoxManage hostonlyifipconfig <name>\n"737 "%s hostonlyif %s ipconfig <name>\n" 725 738 " [--dhcp |\n" 726 739 " --ip<ipv4> [--netmask<ipv4> (def: 255.255.255.0)] |\n" … … 730 743 " remove <name>\n" 731 744 # endif 732 "\n" );745 "\n", SEP); 733 746 } 734 747 #endif … … 737 750 { 738 751 RTStrmPrintf(pStrm, 739 "VBoxManage dhcpserveradd|modify --netname <network_name> |\n"752 "%s dhcpserver %s add|modify --netname <network_name> |\n" 740 753 #if defined(VBOX_WITH_NETFLT) 741 754 " --ifname <hostonly_if_name>\n" … … 746 759 " --upperip <upper_ip>]\n" 747 760 " [--enable | --disable]\n\n" 748 "VBoxManage dhcpserverremove --netname <network_name> |\n"761 "%s dhcpserver %s remove --netname <network_name> |\n" 749 762 #if defined(VBOX_WITH_NETFLT) 750 763 " --ifname <hostonly_if_name>\n" 751 764 #endif 752 "\n" );765 "\n", SEP, SEP); 753 766 } 754 767 if (u64Cmd & USAGE_EXTPACK) 755 768 { 756 769 RTStrmPrintf(pStrm, 757 "VBoxManage extpackinstall [--replace] <tarball> |\n"770 "%s extpack %s install [--replace] <tarball> |\n" 758 771 " uninstall [--force] <name> |\n" 759 772 " cleanup\n" 760 "\n" );773 "\n", SEP); 761 774 } 762 775 }
Note:
See TracChangeset
for help on using the changeset viewer.