sim-card
/
qemu
Archived
10
0
Fork 0

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>
This commit is contained in:
Juan Quintela 2009-10-22 20:50:06 +02:00 committed by Anthony Liguori
parent 76507c7548
commit 9e77fcd027
1 changed files with 12 additions and 0 deletions

12
hw/hw.h
View File

@ -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