aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-12-02 12:36:37 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-03 10:04:53 -0600
commit8595387e3e08cae5ae1caef5633b551f09ba4211 (patch)
treefe0568885670404e7043b67d4f6706fa5edf3c2e
parentd9494b19e3239aaba3eaf85bcdc1ceab3cea3f72 (diff)
vmstate: fix missing ARRAY_OF_POINTERS support on save state
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--savevm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/savevm.c b/savevm.c
index 55a2763f0f..cafb9e7f0d 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1206,6 +1206,9 @@ void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd,
for (i = 0; i < n_elems; i++) {
void *addr = base_addr + field->size * i;
+ if (field->flags & VMS_ARRAY_OF_POINTER) {
+ addr = *(void **)addr;
+ }
if (field->flags & VMS_STRUCT) {
vmstate_save_state(f, field->vmsd, addr);
} else {