summaryrefslogtreecommitdiff
path: root/hw/hw.h
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2009-10-30 21:21:17 +0900
committerAnthony Liguori <aliguori@us.ibm.com>2009-11-09 08:43:09 -0600
commit9cae69bd8d94ccb1e550d8d17a2142a4d36d8c49 (patch)
tree0b3bec60986d1ede78d3efcda8d61cd3e26a9922 /hw/hw.h
parentce195fb532ae6736318f4d05b0a72f055ae2ea60 (diff)
vmstate: introduce VMSTATE_BUFFER_UNSAFE_INFO.
VMSTATE_BUFFER_UNSAFE_INFO for as a buffer with specified VMStateInfo. It will be used later. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/hw.h')
-rw-r--r--hw/hw.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/hw.h b/hw/hw.h
index eb5c639250..cf8c304d98 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -485,11 +485,11 @@ extern const VMStateInfo vmstate_info_unused_buffer;
.offset = vmstate_offset_buffer(_state, _field) + _start, \
}
-#define VMSTATE_BUFFER_UNSAFE(_field, _state, _version, _size) { \
+#define VMSTATE_BUFFER_UNSAFE_INFO(_field, _state, _version, _info, _size) { \
.name = (stringify(_field)), \
.version_id = (_version), \
.size = (_size), \
- .info = &vmstate_info_buffer, \
+ .info = &(_info), \
.flags = VMS_BUFFER, \
.offset = offsetof(_state, _field), \
}
@@ -670,6 +670,9 @@ extern const VMStateDescription vmstate_i2c_slave;
#define VMSTATE_BUFFER_TEST(_f, _s, _test) \
VMSTATE_STATIC_BUFFER(_f, _s, 0, _test, 0, sizeof(typeof_field(_s, _f)))
+#define VMSTATE_BUFFER_UNSAFE(_field, _state, _version, _size) \
+ VMSTATE_BUFFER_UNSAFE_INFO(_field, _state, _version, vmstate_info_buffer, _size)
+
#define VMSTATE_UNUSED_V(_v, _size) \
VMSTATE_UNUSED_BUFFER(NULL, _v, _size)