qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 3/3] hw/onenand.c: fix migration of dynamically allo


From: Igor Mitsyanko
Subject: [Qemu-devel] [PATCH 3/3] hw/onenand.c: fix migration of dynamically allocated buffer "otp"
Date: Sun, 10 Mar 2013 17:47:58 +0400

VMSTATE_BUFFER_UNSAFE should be used for buffers inlined in device state, not
for buffers allocated dynamically. Change to VMSTATE_BUFFER_POINTER_UNSAFE 
macro,
which will do migration right.

Signed-off-by: Igor Mitsyanko <address@hidden>
---
 hw/onenand.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hw/onenand.c b/hw/onenand.c
index 00a8738..12ccb67f 100644
--- a/hw/onenand.c
+++ b/hw/onenand.c
@@ -185,7 +185,8 @@ static const VMStateDescription vmstate_onenand = {
         VMSTATE_UINT8(ecc.cp, OneNANDState),
         VMSTATE_UINT16_ARRAY(ecc.lp, OneNANDState, 2),
         VMSTATE_UINT16(ecc.count, OneNANDState),
-        VMSTATE_BUFFER_UNSAFE(otp, OneNANDState, 0, ((64 + 2) << PAGE_SHIFT)),
+        VMSTATE_BUFFER_POINTER_UNSAFE(otp, OneNANDState, 0,
+            ((64 + 2) << PAGE_SHIFT)),
         VMSTATE_END_OF_LIST()
     }
 };
-- 
1.7.5.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]