summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2013-03-12 14:06:03 +1100
committerJuan Quintela <quintela@redhat.com>2013-03-26 13:30:49 +0100
commit8474a9dd6757be064bf4b35f422b4640d1cca0a5 (patch)
tree9b05bb8fb74c849fde87410e7f8af164cb8f6c9a
parent213945e4d753b5f214468ff746d65fa76e21dbd1 (diff)
downloadfocaccia-qemu-8474a9dd6757be064bf4b35f422b4640d1cca0a5.tar.gz
focaccia-qemu-8474a9dd6757be064bf4b35f422b4640d1cca0a5.zip
savevm: Add VMSTATE_STRUCT_VARRAY_POINTER_UINT32
Currently the savevm code contains a VMSTATE_STRUCT_VARRAY_POINTER_INT32
helper (a variably sized array with the number of elements in an int32_t),
but not VMSTATE_STRUCT_VARRAY_POINTER_UINT32 (... with the number of
elements in a uint32_t).  This patch (trivially) fixes the deficiency.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Juan Quintela <quintela@redhat.com>
-rw-r--r--include/migration/vmstate.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index 5c31ff1c9b..d8af9f2cb3 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -343,6 +343,16 @@ extern const VMStateInfo vmstate_info_bitmap;
     .offset     = vmstate_offset_pointer(_state, _field, _type),     \
 }
 
+#define VMSTATE_STRUCT_VARRAY_POINTER_UINT32(_field, _state, _field_num, _vmsd, _type) { \
+    .name       = (stringify(_field)),                               \
+    .version_id = 0,                                                 \
+    .num_offset = vmstate_offset_value(_state, _field_num, uint32_t),\
+    .size       = sizeof(_type),                                     \
+    .vmsd       = &(_vmsd),                                          \
+    .flags      = VMS_POINTER | VMS_VARRAY_INT32 | VMS_STRUCT,       \
+    .offset     = vmstate_offset_pointer(_state, _field, _type),     \
+}
+
 #define VMSTATE_STRUCT_VARRAY_POINTER_UINT16(_field, _state, _field_num, _vmsd, _type) { \
     .name       = (stringify(_field)),                               \
     .version_id = 0,                                                 \