From owner-freebsd-virtualization@FreeBSD.ORG Wed Oct 23 21:43:45 2013 Return-Path: Delivered-To: virtualization@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 759CA7D3; Wed, 23 Oct 2013 21:43:45 +0000 (UTC) (envelope-from neelnatu@gmail.com) Received: from mail-ie0-x236.google.com (mail-ie0-x236.google.com [IPv6:2607:f8b0:4001:c03::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 29364236B; Wed, 23 Oct 2013 21:43:45 +0000 (UTC) Received: by mail-ie0-f182.google.com with SMTP id as1so2465371iec.13 for ; Wed, 23 Oct 2013 14:43:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=6rBqZqmDz25jDiD3IanzDwZaNn/+WXxM0pC0lVOwpB0=; b=y+mM2OQPbob2PtSnZ2ThLze0mL+YSkwVGMzO3eJgv6BCruKDZcJHyVsjLm6JhvRXx9 SrjuXcaDKJ6TNVSzSFiXO8nOy3YRQ+KUBOuwI4smRTfAuyD6avW/9Qehvl2JN0rHnScq kdHmhKqoFlscJl2VlZ6VfS0Uo+QAcBDBCc3dmkyBY6I1MXoe/g/KZw3ziAuagxFQbwCI Ja3pakjbtHG+pfuxVW52MWkdzbu13UCU2+mN7s6+r5eDTbH4ok/OXEPYwRUELIJT3pLJ IfSfvNLnGzgXKeYkRxTUsjMxJ7M36ZWkFMi9ffIQel7/7ooH92f7ZteqnDafCY5bIoWv oWQw== MIME-Version: 1.0 X-Received: by 10.42.63.194 with SMTP id d2mr1708717ici.10.1382564624538; Wed, 23 Oct 2013 14:43:44 -0700 (PDT) Received: by 10.42.165.5 with HTTP; Wed, 23 Oct 2013 14:43:44 -0700 (PDT) In-Reply-To: <201310231036.55620.jhb@freebsd.org> References: <201310231036.55620.jhb@freebsd.org> Date: Wed, 23 Oct 2013 14:43:44 -0700 Message-ID: Subject: Re: [PATCH] Tidy usage messages for bhyve and bhyveload From: Neel Natu To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Oct 2013 21:43:45 -0000 Hi John, Thanks for the patch - submitted as r257018. best Neel On Wed, Oct 23, 2013 at 7:36 AM, John Baldwin 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 > #include > +#include > #include > #include > #include > @@ -121,9 +122,8 @@ > { > > 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 @@ > " -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); > } > Index: bhyveload/bhyveload.c > =================================================================== > --- bhyveload/bhyveload.c (revision 256946) > +++ bhyveload/bhyveload.c (working copy) > @@ -71,6 +71,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -568,8 +569,9 @@ > { > > 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 @@ > 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" >