aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2017-08-04 18:14:27 +0300
committerEric Blake <eblake@redhat.com>2017-08-30 13:00:38 -0500
commit490dc5ed9bfbaf50ed8186c9729a81f530a11188 (patch)
tree3c434a6065f25c4c35ee117ac25f2cd7d4af6f22
parentba8456442b597848fb5585273c47de8476c3a0c1 (diff)
downloadqemu-490dc5ed9bfbaf50ed8186c9729a81f530a11188.zip
qemu-490dc5ed9bfbaf50ed8186c9729a81f530a11188.tar.gz
qemu-490dc5ed9bfbaf50ed8186c9729a81f530a11188.tar.bz2
nbd/client: fix nbd_send_request to return int
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>
-rw-r--r--include/block/nbd.h2
-rw-r--r--nbd/client.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/block/nbd.h b/include/block/nbd.h
index f745060..040cdd2 100644
--- a/include/block/nbd.h
+++ b/include/block/nbd.h
@@ -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);
diff --git a/nbd/client.c b/nbd/client.c
index f8c213b..68a0bc1 100644
--- a/nbd/client.c
+++ b/nbd/client.c
@@ -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];