Skip to contentSkip to conversation

vmstate: fix varrays with uint32_t indexes

PATCH Superseded Amos Kong 2 participants 2 messages Apr 11, 2011 – Apr 12, 2011

lore
Share & tools
lore

Amos Kong

author
#0 lore raw

PATCH 1/1 vmstate: fix varrays with uint32_t indexes

VARRAY_UINT32 only exists in vmstate_load_state(), but not in vmstate_save_state().

CC Juan Quintela <[email protected]>
---
 savevm.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
savevm.c +2 -0
index 03fce62..09825e6 100644
@@ -1393,6 +1393,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) {
#1 lore raw
Quoted 8 lines · Amos Kong

VARRAY_UINT32 only exists in vmstate_load_state(), but not in vmstate_save_state().

CC Juan Quintela <[email protected]>

---
 savevm.c |    2 ++

 1 files changed, 2 insertions(+), 0 deletions(-)

Hmm...Juan wasn't actually CCed on the email. Fixed.

Stefan