From patchwork Mon Oct 19 18:42:46 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [01/25] vmstate: Add support for partial buffers transmission From: Juan Quintela X-Patchwork-Id: 36392 Message-Id: <8132bc5a516785f3e9ef52696e34944e22b7f845.1255976538.git.quintela@redhat.com> To: qemu-devel@nongnu.org Date: Mon, 19 Oct 2009 20:42:46 +0200 Signed-off-by: Juan Quintela --- hw/hw.h | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 8c223f8..5f48ef8 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -464,6 +464,15 @@ extern const VMStateInfo vmstate_info_buffer; + 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, \