summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2011-03-10 12:33:51 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2011-03-10 16:12:26 -0600
commit2a57b6c893615a587446d4c5b403fa94e8b03305 (patch)
treed0b941fc9cb0b53dbe9b9d05522b761eb49aaf08 /hw
parenta624b086637d5d98507ece1c41f223710af00d1f (diff)
vmstate: add VMSTATE_STRUCT_VARRAY_INT32
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/hw.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/hw.h b/hw/hw.h
index 6e78fa92c..0ed63c52b 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -529,6 +529,16 @@ extern const VMStateInfo vmstate_info_unused_buffer;
.offset = vmstate_offset_pointer(_state, _field, _type), \
}
+#define VMSTATE_STRUCT_VARRAY_INT32(_field, _state, _field_num, _version, _vmsd, _type) { \
+ .name = (stringify(_field)), \
+ .num_offset = vmstate_offset_value(_state, _field_num, int32_t), \
+ .version_id = (_version), \
+ .vmsd = &(_vmsd), \
+ .size = sizeof(_type), \
+ .flags = VMS_STRUCT|VMS_VARRAY_INT32, \
+ .offset = offsetof(_state, _field), \
+}
+
#define VMSTATE_STATIC_BUFFER(_field, _state, _version, _test, _start, _size) { \
.name = (stringify(_field)), \
.version_id = (_version), \