summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/migration/vmstate.h12
-rw-r--r--savevm.c7
2 files changed, 10 insertions, 9 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);
diff --git a/savevm.c b/savevm.c
index 147e2d232e..35c8d1e445 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1423,13 +1423,6 @@ int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
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 *opaque)
{