OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6bd0bd
)
vmstate: create VMSTATE_I2C_SLAVE
author
Juan Quintela
<quintela@redhat.com>
Tue, 29 Sep 2009 20:48:30 +0000
(22:48 +0200)
committer
Anthony Liguori
<aliguori@us.ibm.com>
Mon, 5 Oct 2009 14:32:38 +0000
(09:32 -0500)
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/hw.h
patch
|
blob
|
history
hw/i2c.c
patch
|
blob
|
history
diff --git
a/hw/hw.h
b/hw/hw.h
index
2d86389
..
3796457
100644
(file)
--- 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
diff --git
a/hw/i2c.c
b/hw/i2c.c
index
db9283d
..
e561e7f
100644
(file)
--- a/
hw/i2c.c
+++ b/
hw/i2c.c
@@
-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,