diff options
| author | Marco Cavenati <Marco.Cavenati@eurecom.fr> | 2025-03-26 17:22:30 +0100 |
|---|---|---|
| committer | Fabiano Rosas <farosas@suse.de> | 2025-03-31 09:17:01 -0300 |
| commit | c0b32426ce56182c1ce2a12904f3a702c2ecc460 (patch) | |
| tree | fabdb2fc7406efc7ecbf7447bd88b217130c852f | |
| parent | 0f15892acaf3f50ecc20c6dad4b3ebdd701aa93e (diff) | |
| download | focaccia-qemu-c0b32426ce56182c1ce2a12904f3a702c2ecc460.tar.gz focaccia-qemu-c0b32426ce56182c1ce2a12904f3a702c2ecc460.zip | |
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>
| -rw-r--r-- | migration/channel-block.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/migration/channel-block.c b/migration/channel-block.c index fff8d87094..b0477f5b6d 100644 --- a/migration/channel-block.c +++ b/migration/channel-block.c @@ -123,7 +123,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"); |