@@ -211,14 +211,14 @@ extern const VMStateInfo vmstate_info_bitmap;
.offset = vmstate_offset_value(_state, _field, _type), \
}
-#define VMSTATE_2DARRAY(_field, _state, _n1, _n2, _version, _info, _type) { \
- .name = (stringify(_field)), \
- .version_id = (_version), \
- .num = (_n1) * (_n2), \
- .info = &(_info), \
- .size = sizeof(_type), \
- .flags = VMS_ARRAY, \
- .offset = vmstate_offset_2darray(_state, _field, _type, _n1, _n2), \
+#define VMSTATE_2DARRAY(_field, _state, _n1, _n2, _test, _info, _type) { \
+ .name = (stringify(_field)), \
+ .field_exists = (_test), \
+ .num = (_n1) * (_n2), \
+ .info = &(_info), \
+ .size = sizeof(_type), \
+ .flags = VMS_ARRAY, \
+ .offset = vmstate_offset_2darray(_state, _field, _type, _n1, _n2), \
}
#define VMSTATE_ARRAY_TEST(_field, _state, _num, _test, _info, _type) {\
@@ -603,13 +603,13 @@ extern const VMStateInfo vmstate_info_bitmap;
VMSTATE_ARRAY_TEST(_f, _s, _n, NULL, vmstate_info_float64, float64)
#define VMSTATE_UINT8_2DARRAY(_f, _s, _n1, _n2) \
- VMSTATE_2DARRAY(_f, _s, _n1, _n2, 0, vmstate_info_uint8, uint8_t)
+ VMSTATE_2DARRAY(_f, _s, _n1, _n2, NULL, vmstate_info_uint8, uint8_t)
#define VMSTATE_UINT16_2DARRAY(_f, _s, _n1, _n2) \
- VMSTATE_2DARRAY(_f, _s, _n1, _n2, 0, vmstate_info_uint16, uint16_t)
+ VMSTATE_2DARRAY(_f, _s, _n1, _n2, NULL, vmstate_info_uint16, uint16_t)
#define VMSTATE_UINT32_2DARRAY(_f, _s, _n1, _n2) \
- VMSTATE_2DARRAY(_f, _s, _n1, _n2, 0, vmstate_info_uint32, uint32_t)
+ VMSTATE_2DARRAY(_f, _s, _n1, _n2, NULL, vmstate_info_uint32, uint32_t)
#define VMSTATE_UINT8_SUB_ARRAY(_f, _s, _start, _num) \
VMSTATE_SUB_ARRAY(_f, _s, _start, _num, 0, vmstate_info_uint8, uint8_t)
No user used versions, so easy to change. Signed-off-by: Juan Quintela <quintela@redhat.com> --- include/migration/vmstate.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)