[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/5] vmstate: Use version_id when saving
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PATCH 4/5] vmstate: Use version_id when saving |
Date: |
Mon, 14 Oct 2013 13:45:47 -0300 |
This will allow fields to have version_id > vmsd->version_id, to allow
us to support loading data with higher version_id.
This patch alone is not useful by itself, but it will be useful when
introducing the max_version_id field to VMStateDescription.
Signed-off-by: Eduardo Habkost <address@hidden>
---
savevm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/savevm.c b/savevm.c
index 16276e7..87773ad 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1766,6 +1766,9 @@ void vmstate_save_state(QEMUFile *f, const
VMStateDescription *vmsd,
!field->field_exists(opaque, vmsd->version_id)) {
continue;
}
+ if (field->version_id > vmsd->version_id) {
+ continue;
+ }
void *base_addr = opaque + field->offset;
int i, n_elems = 1;
--
1.8.3.1