]> git.proxmox.com Git - pve-qemu.git/commit
savevm async IO channel: channel writev: fix return value in error case
authorFiona Ebner <f.ebner@proxmox.com>
Mon, 17 Oct 2022 07:18:33 +0000 (09:18 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 18 Oct 2022 13:32:13 +0000 (15:32 +0200)
commit0af826b44869a8d098180cdad3e042daca794610
treed77eabf7ba44ecd5ea589620ba2d3c21c7285d7f
parented23707ed77a9c6b74cdae14d8a427a9a23be9cb
savevm async IO channel: channel writev: fix return value in 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 blk-functions has the potential to
confuse the call sides. Non-blocking mode is not implemented
currently, so -1 it is.

The "return ret" was mistakenly left over from the previous
QEMUFileOps based implementation. Also, use error_setg_errno(), since
the blk(_co)_p{readv,writev} functions return errno codes.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
debian/patches/pve/0016-PVE-add-IOChannel-implementation-for-savevm-async.patch