diff options
author | Igor Mitsyanko <i.mitsyanko@gmail.com> | 2013-04-05 16:17:59 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2013-04-05 16:17:59 +0100 |
commit | 5f00679ee98b1643ff652bbf982dffe1b432596e (patch) | |
tree | 85b5ff90cfa9e3a75e7264726af0980c8a3fdce8 | |
parent | 8070568b9aa8d93b3729ab7e9ca0ef8a6351d2bd (diff) |
hw/sd.c: fix migration of dynamically allocated buffer "buf"
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 <i.mitsyanko@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Michael Walle <michael@walle.cc>
Message-id: 1362923278-4080-3-git-send-email-i.mitsyanko@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | hw/sd.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -478,7 +478,7 @@ static const VMStateDescription sd_vmstate = { VMSTATE_UINT64(data_start, SDState), VMSTATE_UINT32(data_offset, SDState), VMSTATE_UINT8_ARRAY(data, SDState, 512), - VMSTATE_BUFFER_UNSAFE(buf, SDState, 1, 512), + VMSTATE_BUFFER_POINTER_UNSAFE(buf, SDState, 1, 512), VMSTATE_BOOL(enable, SDState), VMSTATE_END_OF_LIST() } |