提交 b79269b7 编写于 作者: I Igor Mitsyanko 提交者: Peter Maydell

hw/onenand.c: fix migration of dynamically allocated buffer "otp"

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: NIgor Mitsyanko <i.mitsyanko@gmail.com>
Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
Message-id: 1362923278-4080-4-git-send-email-i.mitsyanko@gmail.com
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
上级 5f00679e
......@@ -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()
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册