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:
parent
bacbe2842e
commit
1ae71a7793
9
hw/hw.h
9
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), \
|
||||
|
Loading…
x
Reference in New Issue
Block a user