mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-30 13:31:52 -06:00
vmstate: Make vmstate_register() static inline
This avoids adding a duplicate stub for CONFIG_USER_ONLY. Suggested-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
b350ab7583
commit
d7650eab42
2 changed files with 10 additions and 9 deletions
|
@ -638,12 +638,20 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
|
||||||
void *opaque, int version_id);
|
void *opaque, int version_id);
|
||||||
void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd,
|
void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd,
|
||||||
void *opaque);
|
void *opaque);
|
||||||
int vmstate_register(DeviceState *dev, int instance_id,
|
|
||||||
const VMStateDescription *vmsd, void *base);
|
|
||||||
int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
|
int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
|
||||||
const VMStateDescription *vmsd,
|
const VMStateDescription *vmsd,
|
||||||
void *base, int alias_id,
|
void *base, int alias_id,
|
||||||
int required_for_version);
|
int required_for_version);
|
||||||
|
|
||||||
|
static inline int vmstate_register(DeviceState *dev, int instance_id,
|
||||||
|
const VMStateDescription *vmsd,
|
||||||
|
void *opaque)
|
||||||
|
{
|
||||||
|
return vmstate_register_with_alias_id(dev, instance_id, vmsd,
|
||||||
|
opaque, -1, 0);
|
||||||
|
}
|
||||||
|
|
||||||
void vmstate_unregister(DeviceState *dev, const VMStateDescription *vmsd,
|
void vmstate_unregister(DeviceState *dev, const VMStateDescription *vmsd,
|
||||||
void *opaque);
|
void *opaque);
|
||||||
|
|
||||||
|
|
7
savevm.c
7
savevm.c
|
@ -1423,13 +1423,6 @@ int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int vmstate_register(DeviceState *dev, int instance_id,
|
|
||||||
const VMStateDescription *vmsd, void *opaque)
|
|
||||||
{
|
|
||||||
return vmstate_register_with_alias_id(dev, instance_id, vmsd,
|
|
||||||
opaque, -1, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void vmstate_unregister(DeviceState *dev, const VMStateDescription *vmsd,
|
void vmstate_unregister(DeviceState *dev, const VMStateDescription *vmsd,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue