@@ -2648,7 +2648,7 @@ int save_snapshot(const char *name, Error **errp)
if (!bdrv_all_can_snapshot(&bs)) {
error_setg(errp, "Device '%s' is writable but does not support "
- "snapshots", bdrv_get_device_name(bs));
+ "snapshots", bdrv_get_device_or_node_name(bs));
return ret;
}
@@ -2657,7 +2657,7 @@ int save_snapshot(const char *name, Error **errp)
ret = bdrv_all_delete_snapshot(name, &bs1, errp);
if (ret < 0) {
error_prepend(errp, "Error while deleting snapshot on device "
- "'%s': ", bdrv_get_device_name(bs1));
+ "'%s': ", bdrv_get_device_or_node_name(bs1));
return ret;
}
}
@@ -2728,7 +2728,7 @@ int save_snapshot(const char *name, Error **errp)
ret = bdrv_all_create_snapshot(sn, bs, vm_state_size, &bs);
if (ret < 0) {
error_setg(errp, "Error while creating snapshot on '%s'",
- bdrv_get_device_name(bs));
+ bdrv_get_device_or_node_name(bs));
goto the_end;
}
@@ -2846,14 +2846,14 @@ int load_snapshot(const char *name, Error **errp)
if (!bdrv_all_can_snapshot(&bs)) {
error_setg(errp,
"Device '%s' is writable but does not support snapshots",
- bdrv_get_device_name(bs));
+ bdrv_get_device_or_node_name(bs));
return -ENOTSUP;
}
ret = bdrv_all_find_snapshot(name, &bs);
if (ret < 0) {
error_setg(errp,
"Device '%s' does not have the requested snapshot '%s'",
- bdrv_get_device_name(bs), name);
+ bdrv_get_device_or_node_name(bs), name);
return ret;
}
@@ -2882,7 +2882,7 @@ int load_snapshot(const char *name, Error **errp)
ret = bdrv_all_goto_snapshot(name, &bs, errp);
if (ret < 0) {
error_prepend(errp, "Could not load snapshot '%s' on '%s': ",
- name, bdrv_get_device_name(bs));
+ name, bdrv_get_device_or_node_name(bs));
goto err_drain;
}
With blockdev, a BlockDriverState may not have an device name, so using a node name is required as an alternative. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- migration/savevm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)