diff options
author | Juan Quintela <quintela@redhat.com> | 2009-10-20 17:56:13 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-27 12:28:57 -0500 |
commit | 1ae71a7793e0070699daee5c3d6ab3e0ed2bd3db (patch) | |
tree | 22285f76473a9db8bf113ee541778ed01242a078 | |
parent | bacbe2842e30c105747c0bf1b40ae68d9a5f10bb (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>
-rw-r--r-- | hw/hw.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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), \ |