diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-10-24 12:40:41 +0400 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2023-10-30 17:44:03 +0100 |
commit | cd4c0da6dbeac5cc986a4a553c722cbf4b3d0300 (patch) | |
tree | a45edfa809435334383dc66ca84ec86425b48981 /migration/vmstate.c | |
parent | 4d8bdc2ae043a572a2ec6f8788123935a2de0943 (diff) |
migration: set file error on subsection loading
commit 13cde50889237 ("vmstate: Return error in case of error") sets
QemuFile error to stop reading from it and report to the caller (checked
by unit tests). We should do the same on subsection loading error.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231024084043.2926316-8-marcandre.lureau@redhat.com>
Diffstat (limited to 'migration/vmstate.c')
-rw-r--r-- | migration/vmstate.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/migration/vmstate.c b/migration/vmstate.c index 16e33a5d34..9c36803c8a 100644 --- a/migration/vmstate.c +++ b/migration/vmstate.c @@ -179,6 +179,7 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd, assert(field->flags == VMS_END); ret = vmstate_subsection_load(f, vmsd, opaque); if (ret != 0) { + qemu_file_set_error(f, ret); return ret; } if (vmsd->post_load) { |