]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
nbd/client: fix nbd_send_request to return int
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Fri, 4 Aug 2017 15:14:27 +0000 (18:14 +0300)
committerEric Blake <eblake@redhat.com>
Wed, 30 Aug 2017 18:00:38 +0000 (13:00 -0500)
Fix nbd_send_request to return int, as it returns a return value
of nbd_write (which is int), and the only user of nbd_send_request's
return value (nbd_co_send_request) consider it as int too.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20170804151440.320927-5-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
include/block/nbd.h
nbd/client.c

index f7450608b4e1554fc3d74c351357d77a0ba20532..040cdd2e6006f2c372cc594ba551848b481a6f50 100644 (file)
@@ -163,7 +163,7 @@ int nbd_receive_negotiate(QIOChannel *ioc, const char *name,
                           Error **errp);
 int nbd_init(int fd, QIOChannelSocket *sioc, NBDExportInfo *info,
              Error **errp);
-ssize_t nbd_send_request(QIOChannel *ioc, NBDRequest *request);
+int nbd_send_request(QIOChannel *ioc, NBDRequest *request);
 int nbd_receive_reply(QIOChannel *ioc, NBDReply *reply, Error **errp);
 int nbd_client(int fd);
 int nbd_disconnect(int fd);
index f8c213bc96e5380676a898055176527def3c972e..68a0bc1ffc87a01a49b4be1755941af4ddf5e534 100644 (file)
@@ -896,7 +896,7 @@ int nbd_disconnect(int fd)
 }
 #endif
 
-ssize_t nbd_send_request(QIOChannel *ioc, NBDRequest *request)
+int nbd_send_request(QIOChannel *ioc, NBDRequest *request)
 {
     uint8_t buf[NBD_REQUEST_SIZE];