diff options
author | Juan Quintela <quintela@redhat.com> | 2009-08-20 19:42:30 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-08-27 20:30:21 -0500 |
commit | 79c451b9d86359ea9a82b1d72db93b13f887e663 (patch) | |
tree | 632a27a1e1166435bf43fc485236f690ad58030a /hw | |
parent | ec245e2111ec59cd04e2510a183e43dee3fb85ce (diff) | |
download | hqemu-79c451b9d86359ea9a82b1d72db93b13f887e663.zip hqemu-79c451b9d86359ea9a82b1d72db93b13f887e663.tar.gz |
Add VMState support for arrays of structs
This patch add supports for arrays of structs
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.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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 |