diff options
author | Vladimir Sementsov-Ogievskiy | 2017-08-04 17:14:26 +0200 |
---|---|---|
committer | Eric Blake | 2017-08-30 20:00:38 +0200 |
commit | ba8456442b597848fb5585273c47de8476c3a0c1 (patch) | |
tree | e47b423473219963cbd52950618dc59f302f0b49 /include | |
parent | nbd/client: refactor nbd_read_eof (diff) | |
download | qemu-ba8456442b597848fb5585273c47de8476c3a0c1.tar.gz qemu-ba8456442b597848fb5585273c47de8476c3a0c1.tar.xz qemu-ba8456442b597848fb5585273c47de8476c3a0c1.zip |
nbd/client: refactor nbd_receive_reply
Refactor nbd_receive_reply to return 1 on success, 0 on eof, when no
data was read and <0 for other cases, because returned size of read
data is not actually used.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20170804151440.320927-4-vsementsov@virtuozzo.com>
[eblake: tweak function comments]
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/block/nbd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/block/nbd.h b/include/block/nbd.h index 9c3d0a5868..f7450608b4 100644 --- a/include/block/nbd.h +++ b/include/block/nbd.h @@ -164,7 +164,7 @@ int nbd_receive_negotiate(QIOChannel *ioc, const char *name, int nbd_init(int fd, QIOChannelSocket *sioc, NBDExportInfo *info, Error **errp); ssize_t nbd_send_request(QIOChannel *ioc, NBDRequest *request); -ssize_t nbd_receive_reply(QIOChannel *ioc, NBDReply *reply, Error **errp); +int nbd_receive_reply(QIOChannel *ioc, NBDReply *reply, Error **errp); int nbd_client(int fd); int nbd_disconnect(int fd); |