From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Msjdn-00055N-Nf for qemu-devel@nongnu.org; Tue, 29 Sep 2009 16:49:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Msjdi-00051A-Dp for qemu-devel@nongnu.org; Tue, 29 Sep 2009 16:49:42 -0400 Received: from [199.232.76.173] (port=55219 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Msjdi-00050u-3I for qemu-devel@nongnu.org; Tue, 29 Sep 2009 16:49:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34970) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Msjdh-0002Sz-Fj for qemu-devel@nongnu.org; Tue, 29 Sep 2009 16:49:37 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8TKnaqJ029552 for ; Tue, 29 Sep 2009 16:49:36 -0400 From: Juan Quintela Date: Tue, 29 Sep 2009 22:48:33 +0200 Message-Id: <15e42c80d3382ca50a09ad4bf726dd8cb04fd128.1254255997.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [PATCH 14/49] vmstate: create VMSTATE_STRUCT_POINTER List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Signed-off-by: Juan Quintela --- hw/hw.h | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 3796457..51154ab 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), \ -- 1.6.2.5