diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2014-02-17 14:43:49 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-02-21 21:02:22 +0100 |
commit | 77e8b9ca64e85d3d309f322410964b7852ec091e (patch) | |
tree | 83c89ead8b7febc0900867dbce56f5eb5d7a20ed /include/block/nbd.h | |
parent | a69d9af449e9de200abc751d8614124c7486426f (diff) | |
download | qemu-77e8b9ca64e85d3d309f322410964b7852ec091e.zip qemu-77e8b9ca64e85d3d309f322410964b7852ec091e.tar.gz qemu-77e8b9ca64e85d3d309f322410964b7852ec091e.tar.bz2 |
nbd: correctly propagate errors
Before:
$ ./qemu-io-old
qemu-io-old> open -r -o file.driver=nbd
one of path and host must be specified.
qemu-io-old: can't open device (null): Could not open image: Invalid argument
$ ./qemu-io-old
qemu-io-old> open -r -o file.driver=nbd,file.host=foo,file.path=bar
path and host may not be used at the same time.
qemu-io-old: can't open device (null): Could not open image: Invalid argument
After:
$ ./qemu-io
qemu-io> open -r -o file.driver=nbd
qemu-io: can't open device (null): one of path and host must be specified.
$ ./qemu-io
qemu-io> open -r -o file.driver=nbd,file.host=foo,file.path=bar
qemu-io: can't open device (null): path and host may not be used at the same time.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block/nbd.h')
-rw-r--r-- | include/block/nbd.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/block/nbd.h b/include/block/nbd.h index c90f5e4..e10ab82 100644 --- a/include/block/nbd.h +++ b/include/block/nbd.h @@ -64,7 +64,6 @@ enum { ssize_t nbd_wr_sync(int fd, void *buffer, size_t size, bool do_read); int tcp_socket_incoming(const char *address, uint16_t port); int tcp_socket_incoming_spec(const char *address_and_port); -int tcp_socket_outgoing_opts(QemuOpts *opts); int unix_socket_outgoing(const char *path); int unix_socket_incoming(const char *path); |