summary refs log tree commit diff stats
path: root/chardev/char-socket.c
diff options
context:
space:
mode:
authorFiona Ebner <f.ebner@proxmox.com>2022-12-09 14:15:24 +0100
committerJuan Quintela <quintela@redhat.com>2023-02-06 19:22:56 +0100
commit74ecf6ac2b7e53cf480f1f2dc7a3af41525fb588 (patch)
tree15a9d1483819dc00f679d438bd770a25f9ca445b /chardev/char-socket.c
parentdb18dee7d7b069653ae748d68d9d99313dde74c4 (diff)
downloadfocaccia-qemu-74ecf6ac2b7e53cf480f1f2dc7a3af41525fb588.tar.gz
focaccia-qemu-74ecf6ac2b7e53cf480f1f2dc7a3af41525fb588.zip
migration/rdma: fix return value for qio_channel_rdma_{readv,writev}
upon errors. As the documentation in include/io/channel.h states, only
-1 and QIO_CHANNEL_ERR_BLOCK should be returned upon error. Other
values have the potential to confuse the call sites.

error_setg is used rather than error_setg_errno, because there are
certain code paths where -1 (as a non-errno) is propagated up (e.g.
starting from qemu_rdma_block_for_wrid or qemu_rdma_post_recv_control)
all the way to qio_channel_rdma_{readv,writev}.

Similar to a216ec85b7 ("migration/channel-block: fix return value for
qio_channel_block_{readv,writev}").

Suggested-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'chardev/char-socket.c')
0 files changed, 0 insertions, 0 deletions