提交 79c451b9 编写于 作者: J Juan Quintela 提交者: Anthony Liguori

Add VMState support for arrays of structs

This patch add supports for arrays of structs
Signed-off-by: NJuan Quintela <quintela@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 ec245e21
......@@ -361,6 +361,17 @@ extern const VMStateInfo vmstate_info_timer;
+ type_check(_type,typeof_field(_state, _field)) \
}
#define VMSTATE_STRUCT_ARRAY(_field, _state, _num, _version, _vmsd, _type) { \
.name = (stringify(_field)), \
.num = (_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) \
}
/* _f : field name
_n : num of elements
_s : struct state name
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册