Skip to content

Commit

Permalink
migration: set file error on subsection loading
Browse files Browse the repository at this point in the history
commit 13cde50 ("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>
  • Loading branch information
elmarco authored and Juan Quintela committed Oct 24, 2023
1 parent d104789 commit 187423b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions migration/vmstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 187423b

Please sign in to comment.