提交 6680f01c 编写于 作者: J Juan Quintela 提交者: Anthony Liguori

vmstate: Add support for sending partial arrays

This one is needed for changees happening on fdc.  It allows you to send
arrays of structs whose size we want to send it is another field with type
uint8_t.  (If you have been able to read the whole sentence without
stoping for breathing, you can use it.
Signed-off-by: NJuan Quintela <quintela@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 db596c53
......@@ -398,6 +398,18 @@ extern const VMStateInfo vmstate_info_buffer;
+ type_check_array(_type,typeof_field(_state, _field),_num) \
}
#define VMSTATE_STRUCT_ARRAY_SIZE_UINT8(_field, _state, _field__num, _version, _vmsd, _type) { \
.name = (stringify(_field)), \
.num_offset = offsetof(_state, _field_num) \
+ type_check(uint8_t,typeof_field(_state, _field_num)), \
.version_id = (_version), \
.vmsd = &(_vmsd), \
.size = sizeof(_type), \
.flags = VMS_STRUCT|VMS_ARRAY, \
.offset = offsetof(_state, _field) \
+ type_check_array(_type,typeof_field(_state, _field),_num) \
}
#define VMSTATE_STATIC_BUFFER(_field, _state, _version) { \
.name = (stringify(_field)), \
.version_id = (_version), \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册