[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] vmstate: fix vmstate_subsection_load
From: |
TeLeMan |
Subject: |
[Qemu-devel] [PATCH] vmstate: fix vmstate_subsection_load |
Date: |
Wed, 28 Jul 2010 12:37:32 +0800 |
If the new version adds the new subsection for some vmstate, the old
version will load the new version's vmstate unsuccessfully. So we have
to ignore the unrecognized subsections.
Signed-off-by: TeLeMan <address@hidden>
---
savevm.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/savevm.c b/savevm.c
index 9a8328d..3e1aa73 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1581,12 +1581,11 @@ static int vmstate_subsection_load(QEMUFile
*f, const VMStateDescription *vmsd,
version_id = qemu_get_be32(f);
sub_vmsd = vmstate_get_subsection(vmsd->subsections, idstr);
- if (sub_vmsd == NULL) {
- return -ENOENT;
- }
- ret = vmstate_load_state(f, sub_vmsd, opaque, version_id);
- if (ret) {
- return ret;
+ if (sub_vmsd) {
+ ret = vmstate_load_state(f, sub_vmsd, opaque, version_id);
+ if (ret) {
+ return ret;
+ }
}
}
return 0;
--
1.6.5.1.1367.gcd48
--
SUN OF A BEACH
- [Qemu-devel] [PATCH] vmstate: fix vmstate_subsection_load,
TeLeMan <=
- [Qemu-devel] Re: [PATCH] vmstate: fix vmstate_subsection_load, Juan Quintela, 2010/07/28
- [Qemu-devel] Re: [PATCH] vmstate: fix vmstate_subsection_load, TeLeMan, 2010/07/28
- [Qemu-devel] Re: [PATCH] vmstate: fix vmstate_subsection_load, Juan Quintela, 2010/07/28
- [Qemu-devel] Re: [PATCH] vmstate: fix vmstate_subsection_load, TeLeMan, 2010/07/28
- [Qemu-devel] Re: [PATCH] vmstate: fix vmstate_subsection_load, Juan Quintela, 2010/07/28
- [Qemu-devel] Re: [PATCH] vmstate: fix vmstate_subsection_load, TeLeMan, 2010/07/28
- [Qemu-devel] Re: [PATCH] vmstate: fix vmstate_subsection_load, Paolo Bonzini, 2010/07/28
- [Qemu-devel] Re: [PATCH] vmstate: fix vmstate_subsection_load, Juan Quintela, 2010/07/28