qemu-e2k/nbd
Eric Blake 3c1fa35d74 qemu-nbd: Fail earlier for -c/-d on non-linux
Connecting to a /dev/nbdN device is a Linux-specific action.
We were already masking -c and -d from 'qemu-nbd --help' on
non-linux.  However, while -d fails with a sensible error
message, it took hunting through a couple of files to prove
that.  What's more, the code for -c doesn't fail until after
it has created a pthread and tried to open a device - possibly
even printing an error message with %m on a non-Linux platform
in spite of the comment that %m is glibc-specific.  Make the
failure happen sooner, then get rid of stubs that are no
longer needed because of the early exits.

While at it: tweak the blank newlines in --help output to be
consistent, whether or not built on Linux.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20181215135324.152629-7-eblake@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
2019-01-05 07:50:22 -06:00
..
Makefile.objs nbd: Split nbd.c 2016-01-15 18:58:02 +01:00
client.c qemu-nbd: Fail earlier for -c/-d on non-linux 2019-01-05 07:50:22 -06:00
common.c nbd/server: introduce NBD_CMD_CACHE 2018-06-21 09:41:39 -05:00
nbd-internal.h nbd: publish _lookup functions 2019-01-04 17:34:58 -06:00
server.c nbd/server: Advertise all contexts in response to bare LIST 2018-11-30 13:55:18 -06:00
trace-events nbd/client: Trace all server option error messages 2019-01-04 17:34:58 -06:00