summaryrefslogtreecommitdiffstats
path: root/qemu-img.c
diff options
context:
space:
mode:
Diffstat (limited to 'qemu-img.c')
-rw-r--r--qemu-img.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/qemu-img.c b/qemu-img.c
index dc0c2f0..685c566 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -1264,8 +1264,12 @@ static int img_convert(int argc, char **argv)
ret = -1;
goto out;
}
- if (bdrv_snapshot_load_tmp(bs[0], snapshot_name) < 0) {
- error_report("Failed to load snapshot");
+
+ bdrv_snapshot_load_tmp_by_id_or_name(bs[0], snapshot_name, &local_err);
+ if (error_is_set(&local_err)) {
+ error_report("Failed to load snapshot: %s",
+ error_get_pretty(local_err));
+ error_free(local_err);
ret = -1;
goto out;
}
OpenPOWER on IntegriCloud