Skip to contentSkip to conversation

vmstate: Fix info field of VMSTATE_MACADDR

PATCH In review Jan Kiszka 2 participants 2 messages Dec 1, 2009

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 vmstate: Fix info field of VMSTATE_MACADDR

---

This may partly or fully explain the e1000 issue Pierre reported first. However, there are more bugs in the current migration code, e.g. in qemu_fseek when used with streams, it still doesn't work properly here. Need a break...

 hw/hw.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/hw.h +1 -1
index 86ee716..dc119f0 100644
@@ -546,7 +546,7 @@ extern const VMStateDescription vmstate_i2c_slave;
 #define VMSTATE_MACADDR(_field, _state) {                            \
     .name       = (stringify(_field)),                               \
     .size       = sizeof(MACAddr),                                   \
-    .info       = &vmstate_info_uint8,                               \
+    .info       = &vmstate_info_buffer,                              \
     .flags      = VMS_BUFFER,                                        \
     .offset     = vmstate_offset_macaddr(_state, _field),            \
 }
#1 lore raw
Quoted 7 lines · Jan Kiszka

---

This may partly or fully explain the e1000 issue Pierre reported first. However, there are more bugs in the current migration code, e.g. in qemu_fseek when used with streams, it still doesn't work properly here. Need a break...

You arrived at the same conclussion than me :(

Quoted 8 lines
 hw/hw.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/hw.h +0 -0
index 86ee716..dc119f0 100644

hw/hw.h extern const VMStateDescription vmstate_i2c_slave; · line 552

Quoted 8 lines
hw/hw.h +1 -1
@@ -546,7 +546,7 @@ extern const VMStateDescription vmstate_i2c_slave;
 #define VMSTATE_MACADDR(_field, _state) {                            \
     .name       = (stringify(_field)),                               \
     .size       = sizeof(MACAddr),                                   \
-    .info       = &vmstate_info_uint8,                               \
+    .info       = &vmstate_info_buffer,                              \
     .flags      = VMS_BUFFER,                                        \
     .offset     = vmstate_offset_macaddr(_state, _field),            \
 }

Good catch.

Later, Juan.