]> git.ipfire.org Git - thirdparty/qemu.git/commit
migration: fix SEEK_CUR offset calculation in qio_channel_block_seek
authorMarco Cavenati <Marco.Cavenati@eurecom.fr>
Wed, 26 Mar 2025 16:22:30 +0000 (17:22 +0100)
committerFabiano Rosas <farosas@suse.de>
Mon, 31 Mar 2025 12:17:01 +0000 (09:17 -0300)
commitc0b32426ce56182c1ce2a12904f3a702c2ecc460
treefabdb2fc7406efc7ecbf7447bd88b217130c852f
parent0f15892acaf3f50ecc20c6dad4b3ebdd701aa93e
migration: fix SEEK_CUR offset calculation in qio_channel_block_seek

The SEEK_CUR case in qio_channel_block_seek was incorrectly using the
'whence' parameter instead of the 'offset' parameter when calculating the
new position.

Fixes: 65cf200a51 ("migration: introduce a QIOChannel impl for BlockDriverState VMState")
Signed-off-by: Marco Cavenati <Marco.Cavenati@eurecom.fr>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Message-ID: <20250326162230.3323199-1-Marco.Cavenati@eurecom.fr>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
migration/channel-block.c