aboutsummaryrefslogtreecommitdiff
path: root/hw/hw.h
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-09-29 22:48:30 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-05 09:32:38 -0500
commit1894839f86f58c497f48fe8f5d1e6ce1df3b5894 (patch)
tree113173320cbfe1bc07ca0d1425a3333b02570f2d /hw/hw.h
parentb6bd0bdc552d09c123eb5b443ca7e6d0329ff096 (diff)
downloadqemu-1894839f86f58c497f48fe8f5d1e6ce1df3b5894.zip
qemu-1894839f86f58c497f48fe8f5d1e6ce1df3b5894.tar.gz
qemu-1894839f86f58c497f48fe8f5d1e6ce1df3b5894.tar.bz2
vmstate: create VMSTATE_I2C_SLAVE
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/hw.h')
-rw-r--r--hw/hw.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/hw.h b/hw/hw.h
index 2d86389..3796457 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -440,6 +440,17 @@ extern const VMStateDescription vmstate_pci_device;
+ type_check(PCIDevice,typeof_field(_state, _field)) \
}
+extern const VMStateDescription vmstate_i2c_slave;
+
+#define VMSTATE_I2C_SLAVE(_field, _state) { \
+ .name = (stringify(_field)), \
+ .size = sizeof(i2c_slave), \
+ .vmsd = &vmstate_i2c_slave, \
+ .flags = VMS_STRUCT, \
+ .offset = offsetof(_state, _field) \
+ + type_check(i2c_slave,typeof_field(_state, _field)) \
+}
+
/* _f : field name
_f_n : num of elements field_name
_n : num of elements