diff options
Diffstat (limited to 'migration/savevm.c')
-rw-r--r-- | migration/savevm.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/migration/savevm.c b/migration/savevm.c index a71b930b91..59efc1981d 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -760,17 +760,17 @@ int register_savevm_live(const char *idstr, return 0; } -void unregister_savevm(DeviceState *dev, const char *idstr, void *opaque) +void unregister_savevm(VMStateIf *obj, const char *idstr, void *opaque) { SaveStateEntry *se, *new_se; char id[256] = ""; - if (dev) { - char *path = qdev_get_dev_path(dev); - if (path) { - pstrcpy(id, sizeof(id), path); + if (obj) { + char *oid = vmstate_if_get_id(obj); + if (oid) { + pstrcpy(id, sizeof(id), oid); pstrcat(id, sizeof(id), "/"); - g_free(path); + g_free(oid); } } pstrcat(id, sizeof(id), idstr); @@ -784,7 +784,7 @@ void unregister_savevm(DeviceState *dev, const char *idstr, void *opaque) } } -int vmstate_register_with_alias_id(DeviceState *dev, int instance_id, +int vmstate_register_with_alias_id(VMStateIf *obj, int instance_id, const VMStateDescription *vmsd, void *opaque, int alias_id, int required_for_version, @@ -802,8 +802,8 @@ int vmstate_register_with_alias_id(DeviceState *dev, int instance_id, se->vmsd = vmsd; se->alias_id = alias_id; - if (dev) { - char *id = qdev_get_dev_path(dev); + if (obj) { + char *id = vmstate_if_get_id(obj); if (id) { if (snprintf(se->idstr, sizeof(se->idstr), "%s/", id) >= sizeof(se->idstr)) { @@ -834,7 +834,7 @@ int vmstate_register_with_alias_id(DeviceState *dev, int instance_id, return 0; } -void vmstate_unregister(DeviceState *dev, const VMStateDescription *vmsd, +void vmstate_unregister(VMStateIf *obj, const VMStateDescription *vmsd, void *opaque) { SaveStateEntry *se, *new_se; |