From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mm38M-0004Re-HH for qemu-devel@nongnu.org; Fri, 11 Sep 2009 06:13:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mm38H-0004Oy-PU for qemu-devel@nongnu.org; Fri, 11 Sep 2009 06:13:37 -0400 Received: from [199.232.76.173] (port=36110 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mm38H-0004Oq-CR for qemu-devel@nongnu.org; Fri, 11 Sep 2009 06:13:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26839) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mm38G-0000z7-2R for qemu-devel@nongnu.org; Fri, 11 Sep 2009 06:13:32 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8BADUqg001410 for ; Fri, 11 Sep 2009 06:13:30 -0400 From: Juan Quintela Date: Fri, 11 Sep 2009 12:10:29 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [PATCH 09/20] 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 b967670..649eb24 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