mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
vmstate: extract declarations out of hw/hw.h
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
49d4d9b63e
commit
701a8f76aa
10 changed files with 957 additions and 891 deletions
13
net.h
13
net.h
|
@ -6,6 +6,7 @@
|
|||
#include "qdict.h"
|
||||
#include "qemu-option.h"
|
||||
#include "net/queue.h"
|
||||
#include "vmstate.h"
|
||||
|
||||
struct MACAddr {
|
||||
uint8_t a[6];
|
||||
|
@ -178,4 +179,16 @@ void qdev_set_nic_properties(DeviceState *dev, NICInfo *nd);
|
|||
|
||||
int net_handle_fd_param(Monitor *mon, const char *param);
|
||||
|
||||
#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_buffer, \
|
||||
.flags = VMS_BUFFER, \
|
||||
.offset = vmstate_offset_macaddr(_state, _field), \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue