[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 05/49] vmstate: Add support for sending partial arra
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 05/49] vmstate: Add support for sending partial arrays |
Date: |
Tue, 29 Sep 2009 22:48:24 +0200 |
This one is needed for changees happening on fdc. It allows you to send
arrays of structs whose size we want to send it is another field with type
uint8_t. (If you have been able to read the whole sentence without
stoping for breathing, you can use it.
Signed-off-by: Juan Quintela <address@hidden>
---
hw/hw.h | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/hw/hw.h b/hw/hw.h
index b9ae33a..9afe50a 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -398,6 +398,18 @@ extern const VMStateInfo vmstate_info_buffer;
+ type_check_array(_type,typeof_field(_state, _field),_num) \
}
+#define VMSTATE_STRUCT_ARRAY_SIZE_UINT8(_field, _state, _field__num, _version,
_vmsd, _type) { \
+ .name = (stringify(_field)), \
+ .num_offset = offsetof(_state, _field_num) \
+ + type_check(uint8_t,typeof_field(_state, _field_num)), \
+ .version_id = (_version), \
+ .vmsd = &(_vmsd), \
+ .size = sizeof(_type), \
+ .flags = VMS_STRUCT|VMS_ARRAY, \
+ .offset = offsetof(_state, _field) \
+ + type_check_array(_type,typeof_field(_state, _field),_num) \
+}
+
#define VMSTATE_STATIC_BUFFER(_field, _state, _version) { \
.name = (stringify(_field)), \
.version_id = (_version), \
--
1.6.2.5
- [Qemu-devel] [PATCH 00/49] VMState: Fix design faults, i2c port, x86 cpu port, ..., Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 01/49] vmstate: remove const for put operations, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 02/49] vmstate: add version_id argument to post_load, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 03/49] vmstate: remove const from pre_save() functions, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 04/49] vmstate: remove ps2_kbd_load_old(), Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 05/49] vmstate: Add support for sending partial arrays,
Juan Quintela <=
- [Qemu-devel] [PATCH 06/49] qdev: Add support for uint8_t, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 07/49] i2c: addresses are load/save as uint8_t values, change types to reflect this, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 11/49] vmstate: create VMSTATE_I2C_SLAVE, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 08/49] vmstate: port i2c_bus device, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 10/49] vmstate: add uint8 array, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 12/49] vmstate: port wm8750 device, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 09/49] vmstate: port i2c_slave device, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 14/49] vmstate: create VMSTATE_STRUCT_POINTER, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 13/49] vmstate: port max7310 device, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 15/49] vmstate: port pxa2xx_i2c device, Juan Quintela, 2009/09/29