Patchwork vmstate: Fix info field of VMSTATE_MACADDR

login
register
mail settings
Submitter Jan Kiszka
Date Dec. 1, 2009, 7 p.m.
Message ID <4B1567B7.60107@siemens.com>
Download mbox | patch
Permalink /patch/39929/
State New
Headers show

Comments

Jan Kiszka - Dec. 1, 2009, 7 p.m.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

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(-)
Juan Quintela - Dec. 1, 2009, 7:24 p.m.
Jan Kiszka <jan.kiszka@siemens.com> wrote:
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
> 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 :(

>  hw/hw.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/hw/hw.h b/hw/hw.h
> index 86ee716..dc119f0 100644
> --- a/hw/hw.h
> +++ b/hw/hw.h
> @@ -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.

Patch

diff --git a/hw/hw.h b/hw/hw.h
index 86ee716..dc119f0 100644
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -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),            \
 }