Patchwork [14/16] vmstate: Add VMSTATE_STRUCT_VARRAY_UINT8

login
register
mail settings
Submitter Jan Kiszka
Date June 6, 2010, 8:11 a.m.
Message ID <7590c491782050b1a5d2b3165d9c41b80665f582.1275811861.git.jan.kiszka@web.de>
Download mbox | patch
Permalink /patch/54809/
State New
Headers show

Comments

Jan Kiszka - June 6, 2010, 8:11 a.m.
From: Jan Kiszka <jan.kiszka@siemens.com>

Required for hpet.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/hw.h |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

Patch

diff --git a/hw/hw.h b/hw/hw.h
index fc2d184..36be0be 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -474,6 +474,16 @@  extern const VMStateInfo vmstate_info_unused_buffer;
     .offset     = vmstate_offset_array(_state, _field, _type, _num), \
 }
 
+#define VMSTATE_STRUCT_VARRAY_UINT8(_field, _state, _field_num, _version, _vmsd, _type) { \
+    .name       = (stringify(_field)),                               \
+    .num_offset = vmstate_offset_value(_state, _field_num, uint8_t),  \
+    .version_id = (_version),                                        \
+    .vmsd       = &(_vmsd),                                          \
+    .size       = sizeof(_type),                                     \
+    .flags      = VMS_STRUCT|VMS_VARRAY_INT32,                       \
+    .offset     = offsetof(_state, _field),                          \
+}
+
 #define VMSTATE_STATIC_BUFFER(_field, _state, _version, _test, _start, _size) { \
     .name         = (stringify(_field)),                             \
     .version_id   = (_version),                                      \