Skip to content

Commit

Permalink
vmstate: introduce VMSTATE_BUFFER_UNSAFE_INFO.
Browse files Browse the repository at this point in the history
VMSTATE_BUFFER_UNSAFE_INFO for as a buffer with specified VMStateInfo.
It will be used later.

Signed-off-by: Isaku Yamahata <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
  • Loading branch information
Isaku Yamahata authored and Anthony Liguori committed Nov 9, 2009
1 parent ce195fb commit 9cae69b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions hw/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -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), \
}
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 9cae69b

Please sign in to comment.