[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/12] vmstate: Introduce VMSTATE_STRUCT_POINTER_TES
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 06/12] vmstate: Introduce VMSTATE_STRUCT_POINTER_TEST |
Date: |
Wed, 2 Dec 2009 12:36:40 +0100 |
Signed-off-by: Juan Quintela <address@hidden>
---
hw/hw.h | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/hw/hw.h b/hw/hw.h
index 0f4442a..0a5acd4 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -446,12 +446,13 @@ extern const VMStateInfo vmstate_info_unused_buffer;
.offset = vmstate_offset_value(_state, _field, _type), \
}
-#define VMSTATE_STRUCT_POINTER(_field, _state, _vmsd, _type) { \
- .name = (stringify(_field)), \
- .vmsd = &(_vmsd), \
- .size = sizeof(_type), \
- .flags = VMS_STRUCT|VMS_POINTER, \
- .offset = vmstate_offset_value(_state, _field, _type), \
+#define VMSTATE_STRUCT_POINTER_TEST(_field, _state, _test, _vmsd, _type) { \
+ .name = (stringify(_field)), \
+ .field_exists = (_test), \
+ .vmsd = &(_vmsd), \
+ .size = sizeof(_type), \
+ .flags = VMS_STRUCT|VMS_POINTER, \
+ .offset = vmstate_offset_value(_state, _field, _type), \
}
#define VMSTATE_ARRAY_OF_POINTER(_field, _state, _num, _version, _info, _type)
{\
@@ -578,6 +579,9 @@ extern const VMStateDescription vmstate_i2c_slave;
#define VMSTATE_STRUCT(_field, _state, _version, _vmsd, _type) \
VMSTATE_STRUCT_TEST(_field, _state, NULL, _version, _vmsd, _type)
+#define VMSTATE_STRUCT_POINTER(_field, _state, _vmsd, _type) \
+ VMSTATE_STRUCT_POINTER_TEST(_field, _state, NULL, _vmsd, _type)
+
#define VMSTATE_INT8_V(_f, _s, _v) \
VMSTATE_SINGLE(_f, _s, _v, vmstate_info_int8, int8_t)
#define VMSTATE_INT16_V(_f, _s, _v) \
--
1.6.5.2
- [Qemu-devel] [PATCH 00/12] vmstate cleanups and fixes, Juan Quintela, 2009/12/02
- [Qemu-devel] [PATCH 01/12] vmstate: Avoid seeking, Juan Quintela, 2009/12/02
- [Qemu-devel] [PATCH 02/12] vmstate: Fix info field of VMSTATE_MACADDR, Juan Quintela, 2009/12/02
- [Qemu-devel] [PATCH 03/12] vmstate: fix missing ARRAY_OF_POINTERS support on save state, Juan Quintela, 2009/12/02
- [Qemu-devel] [PATCH 04/12] vmstate: Add support for VBUFFERS, Juan Quintela, 2009/12/02
- [Qemu-devel] [PATCH 05/12] vmstate: Introduce VMSTATE_STRUCT_TEST, Juan Quintela, 2009/12/02
- [Qemu-devel] [PATCH 06/12] vmstate: Introduce VMSTATE_STRUCT_POINTER_TEST,
Juan Quintela <=
- [Qemu-devel] [PATCH 07/12] vmstate: Introduce UINT16_TEST support, Juan Quintela, 2009/12/02
- [Qemu-devel] [PATCH 11/12] qdev: enable vmstate_unregister() support, Juan Quintela, 2009/12/02
- [Qemu-devel] [PATCH 10/12] pci: vmstate_register() already assign consecutive numbers starting at 0, Juan Quintela, 2009/12/02
- [Qemu-devel] [PATCH 09/12] vmstate: Add support for multiplying size for a constant, Juan Quintela, 2009/12/02
- [Qemu-devel] [PATCH 08/12] vmstate: remove usused VMSTATE_STRUCT_ARRAY_SIZE_UINT8, Juan Quintela, 2009/12/02
- [Qemu-devel] [PATCH 12/12] savevm: Port to qdev.vmsd all devices that have qdev, Juan Quintela, 2009/12/02