sim-card
/
qemu
Archived
10
0
Fork 0

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>
This commit is contained in:
Juan Quintela 2009-10-20 17:56:13 +02:00 committed by Anthony Liguori
parent bacbe2842e
commit 1ae71a7793
1 changed files with 9 additions and 0 deletions

View File

@ -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), \