From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35696) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrU8V-0002Nl-PJ for qemu-devel@nongnu.org; Wed, 18 Jul 2012 09:17:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrU8P-0005r8-Oj for qemu-devel@nongnu.org; Wed, 18 Jul 2012 09:17:51 -0400 Received: from mail-bk0-f45.google.com ([209.85.214.45]:39313) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrU8P-0005qu-IF for qemu-devel@nongnu.org; Wed, 18 Jul 2012 09:17:45 -0400 Received: by bkcji1 with SMTP id ji1so1221825bkc.4 for ; Wed, 18 Jul 2012 06:17:44 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 18 Jul 2012 15:17:35 +0200 Message-Id: <1342617456-21725-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1342617456-21725-1-git-send-email-pbonzini@redhat.com> References: <1342617456-21725-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 1/2] qemu-nbd: reorganize help message List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This patch separates qemu-nbd's options in logical groups, thus making the help message easier to read. Signed-off-by: Paolo Bonzini --- qemu-nbd.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index 5a0300e..1c32290 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -46,28 +46,39 @@ static int nb_fds; static void usage(const char *name) { - printf( + (printf) ( "Usage: %s [OPTIONS] FILE\n" "QEMU Disk Network Block Device Server\n" "\n" +" -h, --help display this help and exit\n" +" -V, --version output version information and exit\n" +"\n" +"Connection properties:\n" " -p, --port=PORT port to listen on (default `%d')\n" -" -o, --offset=OFFSET offset into the image\n" " -b, --bind=IFACE interface to bind to (default `0.0.0.0')\n" " -k, --socket=PATH path to the unix socket\n" " (default '"SOCKET_PATH"')\n" -" -r, --read-only export read-only\n" -" -P, --partition=NUM only expose partition NUM\n" -" -s, --snapshot use snapshot file\n" -" -n, --nocache disable host cache\n" -" -c, --connect=DEV connect FILE to the local NBD device DEV\n" -" -d, --disconnect disconnect the specified device\n" " -e, --shared=NUM device can be shared by NUM clients (default '1')\n" " -t, --persistent don't exit on the last connection\n" " -v, --verbose display extra debugging information\n" -" -h, --help display this help and exit\n" -" -V, --version output version information and exit\n" "\n" -"Report bugs to \n" +"Exposing part of the image:\n" +" -o, --offset=OFFSET offset into the image\n" +" -P, --partition=NUM only expose partition NUM\n" +"\n" +#ifdef __linux__ +"Kernel NBD client support:\n" +" -c, --connect=DEV connect FILE to the local NBD device DEV\n" +" -d, --disconnect disconnect the specified device\n" +"\n" +#endif +"\n" +"Block device options:\n" +" -r, --read-only export read-only\n" +" -s, --snapshot use snapshot file\n" +" -n, --nocache disable host cache\n" +"\n" +"Report bugs to \n" , name, NBD_DEFAULT_PORT, "DEVICE"); } -- 1.7.10.4