aboutsummaryrefslogtreecommitdiff
path: root/nbd/nbd-internal.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2019-02-18 14:38:15 +0100
committerKevin Wolf <kwolf@redhat.com>2019-02-25 15:03:19 +0100
commita7b78fc944b20b953d68426b7db2c81fc6a5b5af (patch)
tree0801802bba344f07bcc4296b1cb0bb269fd7efbc /nbd/nbd-internal.h
parent2a239e6e03ee188f69f159bb5d8baf648a54c9c1 (diff)
downloadqemu-a7b78fc944b20b953d68426b7db2c81fc6a5b5af.zip
qemu-a7b78fc944b20b953d68426b7db2c81fc6a5b5af.tar.gz
qemu-a7b78fc944b20b953d68426b7db2c81fc6a5b5af.tar.bz2
nbd: Move nbd_read_eof() to nbd/client.c
The only caller of nbd_read_eof() is nbd_receive_reply(), so it doesn't have to live in the header file, but can move next to its caller. Also add the missing coroutine_fn to the function and its caller. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'nbd/nbd-internal.h')
-rw-r--r--nbd/nbd-internal.h19
1 files changed, 0 insertions, 19 deletions
diff --git a/nbd/nbd-internal.h b/nbd/nbd-internal.h
index 82aa221..049f83d 100644
--- a/nbd/nbd-internal.h
+++ b/nbd/nbd-internal.h
@@ -64,25 +64,6 @@
#define NBD_SET_TIMEOUT _IO(0xab, 9)
#define NBD_SET_FLAGS _IO(0xab, 10)
-/* nbd_read_eof
- * Tries to read @size bytes from @ioc.
- * Returns 1 on success
- * 0 on eof, when no data was read (errp is not set)
- * negative errno on failure (errp is set)
- */
-static inline int nbd_read_eof(QIOChannel *ioc, void *buffer, size_t size,
- Error **errp)
-{
- int ret;
-
- assert(size);
- ret = qio_channel_read_all_eof(ioc, buffer, size, errp);
- if (ret < 0) {
- ret = -EIO;
- }
- return ret;
-}
-
/* nbd_write
* Writes @size bytes to @ioc. Returns 0 on success.
*/