From 19df438b63c7164ce4848f526764f374f748bc19 Mon Sep 17 00:00:00 2001
From: Juan Quintela <quintela@redhat.com>
Date: Tue, 29 Sep 2009 22:48:41 +0200
Subject: 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>
---
 savevm.c | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'savevm.c')

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 {
-- 
cgit v1.2.3