From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=47761 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q9Hgd-0004Vu-8m for qemu-devel@nongnu.org; Mon, 11 Apr 2011 10:01:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9Hgb-0000kF-EA for qemu-devel@nongnu.org; Mon, 11 Apr 2011 10:01:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9Hgb-0000jw-0c for qemu-devel@nongnu.org; Mon, 11 Apr 2011 10:01:49 -0400 From: Amos Kong Date: Mon, 11 Apr 2011 22:01:43 +0800 Message-ID: <20110411140143.7200.71424.stgit@localhost6.localdomain6> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] vmstate: fix varrays with uint32_t indexes List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com VARRAY_UINT32 only exists in vmstate_load_state(), but not in vmstate_save_state(). CC: Juan Quintela Signed-off-by: Amos Kong --- savevm.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/savevm.c b/savevm.c index 03fce62..09825e6 100644 --- a/savevm.c +++ b/savevm.c @@ -1393,6 +1393,8 @@ void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd, n_elems = field->num; } else if (field->flags & VMS_VARRAY_INT32) { n_elems = *(int32_t *)(opaque+field->num_offset); + } else if (field->flags & VMS_VARRAY_UINT32) { + n_elems = *(uint32_t *)(opaque+field->num_offset); } else if (field->flags & VMS_VARRAY_UINT16) { n_elems = *(uint16_t *)(opaque+field->num_offset); } else if (field->flags & VMS_VARRAY_UINT8) {