diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-03-05 08:56:10 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-04-19 16:36:43 +0200 |
commit | 185b43386ad999c80bdc58e41b87f05e5b3e8463 (patch) | |
tree | 326967bbfb0f72801848e9aebbad859f33873828 /nbd.h | |
parent | fc19f8a02e45c4d8ad24dd7eb374330b03dfc28e (diff) |
nbd: consistently return negative errno values
In the next patch we need to look at the return code of nbd_wr_sync.
To avoid percolating the socket_error() ugliness all around, let's
handle errors by returning negative errno values.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'nbd.h')
-rw-r--r-- | nbd.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -59,7 +59,7 @@ enum { #define NBD_BUFFER_SIZE (1024*1024) -size_t nbd_wr_sync(int fd, void *buffer, size_t size, bool do_read); +ssize_t nbd_wr_sync(int fd, void *buffer, size_t size, bool do_read); int tcp_socket_outgoing(const char *address, uint16_t port); int tcp_socket_incoming(const char *address, uint16_t port); int tcp_socket_outgoing_spec(const char *address_and_port); |