[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 7/9] migration: set file error on subsection loading
From: |
marcandre . lureau |
Subject: |
[PATCH v2 7/9] migration: set file error on subsection loading |
Date: |
Tue, 24 Oct 2023 12:40:41 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
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>
---
migration/vmstate.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/migration/vmstate.c b/migration/vmstate.c
index d6fe38a5e1..be2193158f 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) {
--
2.41.0
- [PATCH v2 5/9] migration: check required subsections are loaded, once, (continued)
- [PATCH v2 5/9] migration: check required subsections are loaded, once, marcandre . lureau, 2023/10/24
- [PATCH v2 3/9] net/slirp: use different IDs for each instance, marcandre . lureau, 2023/10/24
- [PATCH v2 6/9] migration: check required entries are loaded, once, marcandre . lureau, 2023/10/24
- [PATCH v2 9/9] docs/migration: reflect the changes about needed subsections, marcandre . lureau, 2023/10/24
- [PATCH v2 7/9] migration: set file error on subsection loading,
marcandre . lureau <=
- [PATCH v2 8/9] test-vmstate: add some subsection tests, marcandre . lureau, 2023/10/24