diff options
Diffstat (limited to 'qemu-img.c')
-rw-r--r-- | qemu-img.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/qemu-img.c b/qemu-img.c index 0ae543cad..c8a70ffc9 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -712,6 +712,9 @@ static int img_convert(int argc, char **argv) out_filename = argv[argc - 1]; + /* Initialize before goto out */ + qemu_progress_init(progress, 2.0); + if (options && !strcmp(options, "?")) { ret = print_block_option_help(out_filename, out_fmt); goto out; @@ -724,7 +727,6 @@ static int img_convert(int argc, char **argv) goto out; } - qemu_progress_init(progress, 2.0); qemu_progress_print(0, 100); bs = g_malloc0(bs_n * sizeof(BlockDriverState *)); @@ -1138,11 +1140,13 @@ static int img_info(int argc, char **argv) } bdrv_get_backing_filename(bs, backing_filename, sizeof(backing_filename)); if (backing_filename[0] != '\0') { - path_combine(backing_filename2, sizeof(backing_filename2), - filename, backing_filename); - printf("backing file: %s (actual path: %s)\n", - backing_filename, - backing_filename2); + bdrv_get_full_backing_filename(bs, backing_filename2, + sizeof(backing_filename2)); + printf("backing file: %s", backing_filename); + if (strcmp(backing_filename, backing_filename2) != 0) { + printf(" (actual path: %s)", backing_filename2); + } + putchar('\n'); } dump_snapshots(bs); bdrv_delete(bs); |