summaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-09-29 22:48:41 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-05 09:32:39 -0500
commit19df438b63c7164ce4848f526764f374f748bc19 (patch)
tree28f86908aff663b87335ca4ece9e30245effed6f /savevm.c
parentf0495f56c9f4574140c392bdbad42721ba692d19 (diff)
downloadqemu-19df438b63c7164ce4848f526764f374f748bc19.tar.gz
qemu-19df438b63c7164ce4848f526764f374f748bc19.tar.bz2
qemu-19df438b63c7164ce4848f526764f374f748bc19.zip
vmstate: add support for arrays of pointers
We need this to send arrays of timers Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/savevm.c b/savevm.c
index fefde7c207..11b331b02d 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1070,6 +1070,9 @@ int vmstate_load_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) {
ret = vmstate_load_state(f, field->vmsd, addr, field->vmsd->version_id);
} else {