Patchwork [01/28] vmstate: Fix VMSTATE_VARRAY_UINT32

login
register
mail settings
Submitter Juan Quintela
Date Oct. 26, 2011, 8:16 p.m.
Message ID <ad731c7568df784801b50df98aa136f88738bb36.1319658750.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/121972/
State New
Headers show

Comments

Juan Quintela - Oct. 26, 2011, 8:16 p.m.
We didn't saved elemnts with that size (brown paper bag for me).

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 savevm.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Patch

diff --git a/savevm.c b/savevm.c
index f01838f..557eba4 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1457,6 +1457,8 @@  void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd,
                 n_elems = field->num;
             } else if (field->flags & VMS_VARRAY_INT32) {
                 n_elems = *(int32_t *)(opaque+field->num_offset);
+            } else if (field->flags & VMS_VARRAY_UINT32) {
+                n_elems = *(uint32_t *)(opaque+field->num_offset);
             } else if (field->flags & VMS_VARRAY_UINT16) {
                 n_elems = *(uint16_t *)(opaque+field->num_offset);
             } else if (field->flags & VMS_VARRAY_UINT8) {