summaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-10-16 11:35:18 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-27 12:28:51 -0500
commitbdb4941d07b510fa12f00c8904a209a4ad6956a5 (patch)
treed8758b024781aa1a542646ef4fab3e1a9a1f4688 /savevm.c
parentc7bde572058ab22ee166f5040a34bbb2a3c97f7a (diff)
vmstate: add VMS_VARRAY_UINT16_UNSAFE (varrays with uint16 indexes)
It don't check types. 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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/savevm.c b/savevm.c
index f82a6e65d..cbb60f3a2 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1100,6 +1100,8 @@ int vmstate_load_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_UINT16) {
+ n_elems = *(uint16_t *)(opaque+field->num_offset);
}
if (field->flags & VMS_POINTER) {
base_addr = *(void **)base_addr;
@@ -1147,6 +1149,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_UINT16) {
+ n_elems = *(uint16_t *)(opaque+field->num_offset);
}
if (field->flags & VMS_POINTER) {
base_addr = *(void **)base_addr;