From: Juan Quintela Date: Wed, 14 Oct 2009 13:24:50 +0000 (+0200) Subject: vmstate: Add support for partial buffers transmission X-Git-Tag: TizenStudio_2.0_p2.3~6915 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88e3711e3225b33326782e1b0924aa6509b529f7;p=sdk%2Femulator%2Fqemu.git vmstate: Add support for partial buffers transmission Signed-off-by: Juan Quintela Signed-off-by: Anthony Liguori --- diff --git a/hw/hw.h b/hw/hw.h index c379000..0fda06a 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -473,6 +473,16 @@ extern const VMStateInfo vmstate_info_buffer; .offset = offsetof(_state, _field) \ + type_check_array(uint8_t,typeof_field(_state, _field),sizeof(typeof_field(_state,_field))) \ } + +#define VMSTATE_PARTIAL_BUFFER(_field, _state, _size) { \ + .name = (stringify(_field)), \ + .size = (_size), \ + .info = &vmstate_info_buffer, \ + .flags = VMS_BUFFER, \ + .offset = offsetof(_state, _field) \ + + type_check_array(uint8_t,typeof_field(_state, _field),sizeof(typeof_field(_state,_field))) \ +} + #define VMSTATE_BUFFER_START_MIDDLE(_field, _state, start) { \ .name = (stringify(_field)), \ .size = sizeof(typeof_field(_state,_field)) - start, \