diff options
author | Andreas Färber | 2013-02-18 21:41:59 +0100 |
---|---|---|
committer | Andreas Färber | 2013-03-12 10:35:54 +0100 |
commit | d7650eab429a033c23947f20d1ae14c4d1e719a3 (patch) | |
tree | 7115efd5f76da0f04dc700ba071ebd8e6534aef3 /include/migration/vmstate.h | |
parent | target-sh4: Move PVR/PRR/CVR into SuperHCPUClass (diff) | |
download | qemu-d7650eab429a033c23947f20d1ae14c4d1e719a3.tar.gz qemu-d7650eab429a033c23947f20d1ae14c4d1e719a3.tar.xz qemu-d7650eab429a033c23947f20d1ae14c4d1e719a3.zip |
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 a64db941bc..20db76fdf7 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); |