aboutsummaryrefslogtreecommitdiff
path: root/hw/hw.h
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2011-03-10 12:33:49 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2011-03-10 16:12:26 -0600
commit82fa39b75181b730d6d4d09f443bd26bcfcd045c (patch)
tree9696258d307423731666ada2651568c55d4be317 /hw/hw.h
parent9122a8fed743dbe034db53bcde4b4c313f672f2f (diff)
downloadqemu-82fa39b75181b730d6d4d09f443bd26bcfcd045c.zip
qemu-82fa39b75181b730d6d4d09f443bd26bcfcd045c.tar.gz
qemu-82fa39b75181b730d6d4d09f443bd26bcfcd045c.tar.bz2
vmstate: Fix varrays with uint8 indexes
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/hw.h')
-rw-r--r--hw/hw.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/hw.h b/hw/hw.h
index 0299207..40c6396 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -298,6 +298,7 @@ enum VMStateFlags {
VMS_VARRAY_UINT16 = 0x080, /* Array with size in uint16_t field */
VMS_VBUFFER = 0x100, /* Buffer with size in int32_t field */
VMS_MULTIPLY = 0x200, /* multiply "size" field by field_size */
+ VMS_VARRAY_UINT8 = 0x400, /* Array with size in uint8_t field*/
};
typedef struct {
@@ -489,11 +490,11 @@ extern const VMStateInfo vmstate_info_unused_buffer;
#define VMSTATE_STRUCT_VARRAY_UINT8(_field, _state, _field_num, _version, _vmsd, _type) { \
.name = (stringify(_field)), \
- .num_offset = vmstate_offset_value(_state, _field_num, uint8_t), \
+ .num_offset = vmstate_offset_value(_state, _field_num, uint8_t), \
.version_id = (_version), \
.vmsd = &(_vmsd), \
.size = sizeof(_type), \
- .flags = VMS_STRUCT|VMS_VARRAY_INT32, \
+ .flags = VMS_STRUCT|VMS_VARRAY_UINT8, \
.offset = offsetof(_state, _field), \
}