Patchwork [7/9] vmstate: Add a way to send a partial array

login
register
mail settings
Submitter Juan Quintela
Date March 10, 2011, 11:33 a.m.
Message ID <6ad8951153a69d47c8e9a8e58178a041484d1299.1299756608.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/86236/
State New
Headers show

Comments

Juan Quintela - March 10, 2011, 11:33 a.m.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/hw.h |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

Patch

diff --git a/hw/hw.h b/hw/hw.h
index c198ce8..9df1c2c 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -429,6 +429,15 @@  extern const VMStateInfo vmstate_info_unused_buffer;
     .offset     = vmstate_offset_sub_array(_state, _field, _type, _start), \
 }

+#define VMSTATE_ARRAY_INT32_UNSAFE(_field, _state, _field_num, _info, _type) {\
+    .name       = (stringify(_field)),                               \
+    .num_offset = vmstate_offset_value(_state, _field_num, int32_t), \
+    .info       = &(_info),                                          \
+    .size       = sizeof(_type),                                     \
+    .flags      = VMS_VARRAY_INT32,                                  \
+    .offset     = offsetof(_state, _field),                          \
+}
+
 #define VMSTATE_VARRAY_INT32(_field, _state, _field_num, _version, _info, _type) {\
     .name       = (stringify(_field)),                               \
     .version_id = (_version),                                        \