diff options
author | Juan Quintela <quintela@redhat.com> | 2009-10-22 20:50:06 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-27 12:28:51 -0500 |
commit | 9e77fcd0274fcb5859f4e8acf91d40b2f967fcc4 (patch) | |
tree | cf01c6bfd8d02f2d6efafe51642c8e1a76d6aa90 | |
parent | 76507c754831bc6c01cc010255b992c7c9b57742 (diff) |
vmstate: Add VMSTATE_MACADDR for the new type
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | hw/hw.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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 |