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>
diff --git a/nbd.h b/nbd.h
index 217a82d..40d58d3 100644
--- a/nbd.h
+++ b/nbd.h
@@ -59,7 +59,7 @@
 
 #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);