Date: Wed, 23 Oct 2013 14:43:44 -0700 From: Neel Natu <neelnatu@gmail.com> To: John Baldwin <jhb@freebsd.org> Cc: "freebsd-virtualization@freebsd.org" <virtualization@freebsd.org> Subject: Re: [PATCH] Tidy usage messages for bhyve and bhyveload Message-ID: <CAFgRE9EiaRARK2fuF4VMfGL8B4mcFMgXqyPrH4QQNqwSEUCiKg@mail.gmail.com> In-Reply-To: <201310231036.55620.jhb@freebsd.org> References: <201310231036.55620.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi John, Thanks for the patch - submitted as r257018. best Neel On Wed, Oct 23, 2013 at 7:36 AM, John Baldwin <jhb@freebsd.org> wrote: > These are just some cosmetic nits to the usage messages for bhyve and > bhyveload so that they are more consistent with other tools in the base > system (spaces between options, wrapping at 80 cols, etc.) > > Index: bhyve/bhyverun.c > =================================================================== > --- bhyve/bhyverun.c (revision 256946) > +++ bhyve/bhyverun.c (working copy) > @@ -37,6 +37,7 @@ > > #include <stdio.h> > #include <stdlib.h> > +#include <string.h> > #include <err.h> > #include <libgen.h> > #include <unistd.h> > @@ -121,9 +122,8 @@ > { > > 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 @@ > " -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); > } > Index: bhyveload/bhyveload.c > =================================================================== > --- bhyveload/bhyveload.c (revision 256946) > +++ bhyveload/bhyveload.c (working copy) > @@ -71,6 +71,7 @@ > #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 @@ > { > > 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 @@ > int opt, error; > char *disk_image; > > - progname = argv[0]; > + progname = basename(argv[0]); > > mem_size = 256 * MB; > disk_image = NULL; > > -- > John Baldwin > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to " > freebsd-virtualization-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFgRE9EiaRARK2fuF4VMfGL8B4mcFMgXqyPrH4QQNqwSEUCiKg>