aboutsummaryrefslogtreecommitdiff
path: root/hw/hw.h
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-10-20 17:56:13 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-27 12:28:57 -0500
commit1ae71a7793e0070699daee5c3d6ab3e0ed2bd3db (patch)
tree22285f76473a9db8bf113ee541778ed01242a078 /hw/hw.h
parentbacbe2842e30c105747c0bf1b40ae68d9a5f10bb (diff)
vmstate: Add VMSTATE_BUFFER_UNSAFE
Just sent <anything> as a buffer. We put the pointer and the size code does the rest. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/hw.h')
-rw-r--r--hw/hw.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/hw.h b/hw/hw.h
index 0509ee9698..eb5c639250 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -485,6 +485,15 @@ extern const VMStateInfo vmstate_info_unused_buffer;
.offset = vmstate_offset_buffer(_state, _field) + _start, \
}
+#define VMSTATE_BUFFER_UNSAFE(_field, _state, _version, _size) { \
+ .name = (stringify(_field)), \
+ .version_id = (_version), \
+ .size = (_size), \
+ .info = &vmstate_info_buffer, \
+ .flags = VMS_BUFFER, \
+ .offset = offsetof(_state, _field), \
+}
+
#define VMSTATE_UNUSED_BUFFER(_test, _version, _size) { \
.name = "unused", \
.field_exists = (_test), \