migration/channel-block: fix return value for qio_channel_block_{readv,writev}
authorFiona Ebner <f.ebner@proxmox.com>
Thu, 13 Oct 2022 08:41:00 +0000 (10:41 +0200)
committerJuan Quintela <quintela@redhat.com>
Mon, 21 Nov 2022 10:56:12 +0000 (11:56 +0100)
commita216ec85b78ea96b51950665879524132f6e678c
tree24b6bee13b6ed8408215b01e2f4340e0384dfa0c
parenta082fab9d259473a9d5d53307cf83b1223301181
migration/channel-block: fix return value for qio_channel_block_{readv,writev}

in the error case. The documentation in include/io/channel.h states
that -1 or QIO_CHANNEL_ERR_BLOCK should be returned upon error. Simply
passing along the return value from the bdrv-functions has the
potential to confuse the call sides. Non-blocking mode is not
implemented currently, so -1 it is.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/channel-block.c