mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-06 06:27:41 -07:00
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> (cherry picked from commitc0b32426ce) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
a527d31074
commit
d34c201195
1 changed files with 1 additions and 1 deletions
|
|
@ -122,7 +122,7 @@ qio_channel_block_seek(QIOChannel *ioc,
|
|||
bioc->offset = offset;
|
||||
break;
|
||||
case SEEK_CUR:
|
||||
bioc->offset += whence;
|
||||
bioc->offset += offset;
|
||||
break;
|
||||
case SEEK_END:
|
||||
error_setg(errp, "Size of VMstate region is unknown");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue