From 840e9cef84799df41a2f25de9cd818ec468b53ef Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Tue, 29 Sep 2009 22:48:33 +0200 Subject: [PATCH] vmstate: create VMSTATE_STRUCT_POINTER Signed-off-by: Juan Quintela Signed-off-by: Anthony Liguori --- hw/hw.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/hw.h b/hw/hw.h index 3796457722..51154ab325 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -387,6 +387,15 @@ extern const VMStateInfo vmstate_info_buffer; + 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) { \ .name = (stringify(_field)), \ .num = (_num), \ -- 2.11.4.GIT