diff options
author | Andreas Färber <afaerber@suse.de> | 2013-02-18 21:41:59 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-03-12 10:35:54 +0100 |
commit | d7650eab429a033c23947f20d1ae14c4d1e719a3 (patch) | |
tree | 7115efd5f76da0f04dc700ba071ebd8e6534aef3 /include/migration/vmstate.h | |
parent | b350ab758342c764a6ead6ef064b15a72c830808 (diff) | |
download | hqemu-d7650eab429a033c23947f20d1ae14c4d1e719a3.zip hqemu-d7650eab429a033c23947f20d1ae14c4d1e719a3.tar.gz |
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>
Diffstat (limited to 'include/migration/vmstate.h')
-rw-r--r-- | include/migration/vmstate.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index a64db94..20db76f 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -638,12 +638,20 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd, void *opaque, int version_id); void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd, 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, const VMStateDescription *vmsd, void *base, int alias_id, 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 *opaque); |