aboutsummaryrefslogtreecommitdiff
path: root/qemu-nbd.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-07-18 14:50:52 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-07-24 09:31:53 +0200
commitb033cd864042646dd3e17a23c7850c413bc360f4 (patch)
treef852171f361c792975369139c60085d725d35adb /qemu-nbd.c
parenta21143486b9c6d7a50b7b62877c02b3c686943cb (diff)
qemu-nbd: reorganize help message
This patch separates qemu-nbd's options in logical groups, thus making the help message easier to read. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qemu-nbd.c')
-rw-r--r--qemu-nbd.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/qemu-nbd.c b/qemu-nbd.c
index 5a0300eb07..1c32290a8e 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 <anthony@codemonkey.ws>\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 <qemu-devel@nongnu.org>\n"
, name, NBD_DEFAULT_PORT, "DEVICE");
}