Tidy usage messages for bhyve and bhyveload.

Submitted by:	jhb
This commit is contained in:
Neel Natu 2013-10-23 21:42:53 +00:00
parent dd2f74a820
commit b5331f4d88
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257018
2 changed files with 11 additions and 9 deletions

View File

@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <err.h>
#include <libgen.h>
#include <unistd.h>
@ -121,9 +122,8 @@ usage(int code)
{
fprintf(stderr,
"Usage: %s [-aehAHIPW][-g <gdb port>][-s <pci>][-S <pci>]"
"[-c vcpus][-p pincpu][-m mem]"
" <vmname>\n"
"Usage: %s [-aehAHIPW] [-g <gdb port>] [-s <pci>] [-S <pci>]\n"
" %*s [-c vcpus] [-p pincpu] [-m mem] <vmname>\n"
" -a: local apic is in XAPIC mode (default is X2APIC)\n"
" -A: create an ACPI table\n"
" -g: gdb port\n"
@ -132,13 +132,13 @@ usage(int code)
" -H: vmexit from the guest on hlt\n"
" -I: present an ioapic to the guest\n"
" -P: vmexit from the guest on pause\n"
" -W: force virtio to use single-vector MSI\n"
" -e: exit on unhandled i/o access\n"
" -W: force virtio to use single-vector MSI\n"
" -e: exit on unhandled I/O access\n"
" -h: help\n"
" -s: <slot,driver,configinfo> PCI slot config\n"
" -S: <slot,driver,configinfo> legacy PCI slot config\n"
" -m: memory size in MB\n",
progname);
progname, (int)strlen(progname), "");
exit(code);
}

View File

@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$");
#include <err.h>
#include <fcntl.h>
#include <getopt.h>
#include <libgen.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
@ -568,8 +569,9 @@ usage(void)
{
fprintf(stderr,
"usage: %s [-m mem-size][-d <disk-path>] [-h <host-path>] "
"[-e <name=value>] <vmname>\n", progname);
"usage: %s [-m mem-size] [-d <disk-path>] [-h <host-path>]\n"
" %*s [-e <name=value>] <vmname>\n", progname,
(int)strlen(progname), "");
exit(1);
}
@ -582,7 +584,7 @@ main(int argc, char** argv)
int opt, error;
char *disk_image;
progname = argv[0];
progname = basename(argv[0]);
mem_size = 256 * MB;
disk_image = NULL;