vmstate: fix missing ARRAY_OF_POINTERS support on save state
authorJuan Quintela <quintela@redhat.com>
Wed, 2 Dec 2009 11:36:37 +0000 (12:36 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 3 Dec 2009 16:04:53 +0000 (10:04 -0600)
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
savevm.c

index 55a2763..cafb9e7 100644 (file)
--- 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 {