提交 1894839f 编写于 作者: J Juan Quintela 提交者: Anthony Liguori

vmstate: create VMSTATE_I2C_SLAVE

Signed-off-by: NJuan Quintela <quintela@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 b6bd0bdc
......@@ -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
......
......@@ -153,7 +153,7 @@ static int i2c_slave_post_load(void *opaque, int version_id)
return 0;
}
static const VMStateDescription vmstate_i2c_slave = {
const VMStateDescription vmstate_i2c_slave = {
.name = "i2c_slave",
.version_id = 1,
.minimum_version_id = 1,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册