From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNYTB-0001hK-Q4 for qemu-devel@nongnu.org; Sun, 14 Oct 2012 20:23:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNYT9-0001wK-5G for qemu-devel@nongnu.org; Sun, 14 Oct 2012 20:23:45 -0400 From: David Gibson Date: Mon, 15 Oct 2012 10:24:33 +1000 Message-Id: <1350260682-21428-7-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1350260682-21428-1-git-send-email-david@gibson.dropbear.id.au> References: <1350260682-21428-1-git-send-email-david@gibson.dropbear.id.au> Subject: [Qemu-devel] [PATCH 06/15] savevm: Add VMSTATE_STRUCT_VARRAY_POINTER_UINT32 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: agraf@suse.de, quintela@redhat.com Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Currently the savevm code contains a VMSTATE_STRUCT_VARRAY_POINTER_INT32 helper (a variably sized array with the number of elements in an int32_t), but not VMSTATE_STRUCT_VARRAY_POINTER_UINT32 (... with the number of elements in a uint32_t). This patch (trivially) fixes the deficiency. Signed-off-by: David Gibson --- vmstate.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vmstate.h b/vmstate.h index a04561e..4b393a0 100644 --- a/vmstate.h +++ b/vmstate.h @@ -322,6 +322,16 @@ extern const VMStateInfo vmstate_info_unused_buffer; .offset = vmstate_offset_pointer(_state, _field, _type), \ } +#define VMSTATE_STRUCT_VARRAY_POINTER_UINT32(_field, _state, _field_num, _vmsd, _type) { \ + .name = (stringify(_field)), \ + .version_id = 0, \ + .num_offset = vmstate_offset_value(_state, _field_num, uint32_t),\ + .size = sizeof(_type), \ + .vmsd = &(_vmsd), \ + .flags = VMS_POINTER | VMS_VARRAY_INT32 | VMS_STRUCT, \ + .offset = vmstate_offset_pointer(_state, _field, _type), \ +} + #define VMSTATE_STRUCT_VARRAY_POINTER_UINT16(_field, _state, _field_num, _vmsd, _type) { \ .name = (stringify(_field)), \ .version_id = 0, \ -- 1.7.10.4