mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
migration: use qemu_file_get_error() return value when possible
Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
3961b4dd0e
commit
42802d47dd
4 changed files with 24 additions and 16 deletions
|
@ -371,6 +371,7 @@ int ram_load(QEMUFile *f, void *opaque, int version_id)
|
|||
{
|
||||
ram_addr_t addr;
|
||||
int flags;
|
||||
int error;
|
||||
|
||||
if (version_id < 3 || version_id > 4) {
|
||||
return -EINVAL;
|
||||
|
@ -451,8 +452,9 @@ int ram_load(QEMUFile *f, void *opaque, int version_id)
|
|||
|
||||
qemu_get_buffer(f, host, TARGET_PAGE_SIZE);
|
||||
}
|
||||
if (qemu_file_get_error(f)) {
|
||||
return -EIO;
|
||||
error = qemu_file_get_error(f);
|
||||
if (error) {
|
||||
return error;
|
||||
}
|
||||
} while (!(flags & RAM_SAVE_FLAG_EOS));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue