Revision 7102400d

b/include/migration/vmstate.h
310 310
    .offset       = vmstate_offset_value(_state, _field, _type),     \
311 311
}
312 312

  
313
#define VMSTATE_STRUCT_POINTER_TEST(_field, _state, _test, _vmsd, _type) { \
313
#define VMSTATE_STRUCT_POINTER_V(_field, _state, _version, _vmsd, _type) { \
314 314
    .name         = (stringify(_field)),                             \
315
    .version_id   = (_version),                                        \
316
    .vmsd         = &(_vmsd),                                        \
317
    .size         = sizeof(_type),                                   \
318
    .flags        = VMS_STRUCT|VMS_POINTER,                          \
319
    .offset       = vmstate_offset_value(_state, _field, _type),     \
320
}
321

  
322
#define VMSTATE_STRUCT_POINTER_TEST_V(_field, _state, _test, _version, _vmsd, _type) { \
323
    .name         = (stringify(_field)),                             \
324
    .version_id   = (_version),                                        \
315 325
    .field_exists = (_test),                                         \
316 326
    .vmsd         = &(_vmsd),                                        \
317 327
    .size         = sizeof(_type),                                   \
......
497 507
    VMSTATE_STRUCT_TEST(_field, _state, NULL, _version, _vmsd, _type)
498 508

  
499 509
#define VMSTATE_STRUCT_POINTER(_field, _state, _vmsd, _type)          \
500
    VMSTATE_STRUCT_POINTER_TEST(_field, _state, NULL, _vmsd, _type)
510
    VMSTATE_STRUCT_POINTER_V(_field, _state, 0, _vmsd, _type)
511

  
512
#define VMSTATE_STRUCT_POINTER_TEST(_field, _state, _test, _vmsd, _type)     \
513
    VMSTATE_STRUCT_POINTER_TEST_V(_field, _state, _test, 0, _vmsd, _type)
501 514

  
502 515
#define VMSTATE_STRUCT_ARRAY(_field, _state, _num, _version, _vmsd, _type) \
503 516
    VMSTATE_STRUCT_ARRAY_TEST(_field, _state, _num, NULL, _version,   \

Also available in: Unified diff