" 'filename' is a disk image filename\n"
" 'fmt' is the disk image format. It is guessed automatically in most cases\n"
" 'cache' is the cache mode used to write the output disk image, the valid\n"
- " options are: 'none', 'writeback' (default), 'writethrough', 'directsync'\n"
- " and 'unsafe'\n"
+ " options are: 'none', 'writeback' (default, except for convert), 'writethrough',\n"
+ " 'directsync' and 'unsafe' (default for convert)\n"
" 'size' is the disk image size in bytes. Optional suffixes\n"
" 'k' or 'K' (kilobyte, 1024), 'M' (megabyte, 1024k), 'G' (gigabyte, 1024M)\n"
" and T (terabyte, 1024G) are supported. 'b' is ignored.\n"
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;
goto out;
}
- qemu_progress_init(progress, 2.0);
qemu_progress_print(0, 100);
bs = g_malloc0(bs_n * sizeof(BlockDriverState *));
}
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);