summaryrefslogtreecommitdiffstats
path: root/include/migration/vmstate.h
diff options
context:
space:
mode:
authorAndreas Färber2013-02-18 21:41:59 +0100
committerAndreas Färber2013-03-12 10:35:54 +0100
commitd7650eab429a033c23947f20d1ae14c4d1e719a3 (patch)
tree7115efd5f76da0f04dc700ba071ebd8e6534aef3 /include/migration/vmstate.h
parenttarget-sh4: Move PVR/PRR/CVR into SuperHCPUClass (diff)
downloadqemu-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.h12
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);