From owner-svn-src-all@FreeBSD.ORG Wed Oct 23 21:42:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4CD89550; Wed, 23 Oct 2013 21:42:54 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 202A72353; Wed, 23 Oct 2013 21:42:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9NLgrme060388; Wed, 23 Oct 2013 21:42:53 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9NLgrSB060386; Wed, 23 Oct 2013 21:42:53 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201310232142.r9NLgrSB060386@svn.freebsd.org> From: Neel Natu Date: Wed, 23 Oct 2013 21:42:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257018 - in head/usr.sbin: bhyve bhyveload X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Oct 2013 21:42:54 -0000 Author: neel Date: Wed Oct 23 21:42:53 2013 New Revision: 257018 URL: http://svnweb.freebsd.org/changeset/base/257018 Log: Tidy usage messages for bhyve and bhyveload. Submitted by: jhb Modified: head/usr.sbin/bhyve/bhyverun.c head/usr.sbin/bhyveload/bhyveload.c Modified: head/usr.sbin/bhyve/bhyverun.c ============================================================================== --- head/usr.sbin/bhyve/bhyverun.c Wed Oct 23 21:35:39 2013 (r257017) +++ head/usr.sbin/bhyve/bhyverun.c Wed Oct 23 21:42:53 2013 (r257018) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -121,9 +122,8 @@ usage(int code) { fprintf(stderr, - "Usage: %s [-aehAHIPW][-g ][-s ][-S ]" - "[-c vcpus][-p pincpu][-m mem]" - " \n" + "Usage: %s [-aehAHIPW] [-g ] [-s ] [-S ]\n" + " %*s [-c vcpus] [-p pincpu] [-m mem] \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: PCI slot config\n" " -S: legacy PCI slot config\n" " -m: memory size in MB\n", - progname); + progname, (int)strlen(progname), ""); exit(code); } Modified: head/usr.sbin/bhyveload/bhyveload.c ============================================================================== --- head/usr.sbin/bhyveload/bhyveload.c Wed Oct 23 21:35:39 2013 (r257017) +++ head/usr.sbin/bhyveload/bhyveload.c Wed Oct 23 21:42:53 2013 (r257018) @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -568,8 +569,9 @@ usage(void) { fprintf(stderr, - "usage: %s [-m mem-size][-d ] [-h ] " - "[-e ] \n", progname); + "usage: %s [-m mem-size] [-d ] [-h ]\n" + " %*s [-e ] \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;