mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-09 11:43:34 +00:00
vmstate: create VMSTATE_STRUCT_POINTER
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
7cb45faabd
commit
840e9cef84
9
hw/hw.h
9
hw/hw.h
@ -387,6 +387,15 @@ extern const VMStateInfo vmstate_info_buffer;
|
|||||||
+ type_check(_type,typeof_field(_state, _field)) \
|
+ type_check(_type,typeof_field(_state, _field)) \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define VMSTATE_STRUCT_POINTER(_field, _state, _vmsd, _type) { \
|
||||||
|
.name = (stringify(_field)), \
|
||||||
|
.vmsd = &(_vmsd), \
|
||||||
|
.size = sizeof(_type), \
|
||||||
|
.flags = VMS_STRUCT|VMS_POINTER, \
|
||||||
|
.offset = offsetof(_state, _field) \
|
||||||
|
+ type_check(_type,typeof_field(_state, _field)) \
|
||||||
|
}
|
||||||
|
|
||||||
#define VMSTATE_STRUCT_ARRAY(_field, _state, _num, _version, _vmsd, _type) { \
|
#define VMSTATE_STRUCT_ARRAY(_field, _state, _num, _version, _vmsd, _type) { \
|
||||||
.name = (stringify(_field)), \
|
.name = (stringify(_field)), \
|
||||||
.num = (_num), \
|
.num = (_num), \
|
||||||
|
Loading…
Reference in New Issue
Block a user