From: Juan Quintela Date: Thu, 22 Oct 2009 18:50:06 +0000 (+0200) Subject: vmstate: Add VMSTATE_MACADDR for the new type X-Git-Tag: TizenStudio_2.0_p2.3~6900 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f3100fe778db8311c5d839143c8cba1229746f1;p=sdk%2Femulator%2Fqemu.git vmstate: Add VMSTATE_MACADDR for the new type Signed-off-by: Juan Quintela Signed-off-by: Anthony Liguori --- diff --git a/hw/hw.h b/hw/hw.h index f3b5160..15c93f8 100644 --- a/hw/hw.h +++ b/hw/hw.h @@ -500,6 +500,18 @@ extern const VMStateDescription vmstate_i2c_slave; .offset = vmstate_offset_value(_state, _field, i2c_slave), \ } +#define vmstate_offset_macaddr(_state, _field) \ + vmstate_offset_array(_state, _field.a, uint8_t, \ + sizeof(typeof_field(_state, _field))) + +#define VMSTATE_MACADDR(_field, _state) { \ + .name = (stringify(_field)), \ + .size = sizeof(MACAddr), \ + .info = &vmstate_info_uint8, \ + .flags = VMS_BUFFER, \ + .offset = vmstate_offset_macaddr(_state, _field), \ +} + /* _f : field name _f_n : num of elements field_name _n : num of elements