mirror of https://github.com/xqemu/xqemu.git
qemu-img: Fix qemu-img convert -n
If -n is specified, it does not matter whether the output format and protocol support image creation; building the creation options should simply be skipped. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1423666727-20777-2-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
fb13bbf2fd
commit
2e024cde1f
|
@ -1531,6 +1531,7 @@ static int img_convert(int argc, char **argv)
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (!skip_create) {
|
||||
if (!drv->create_opts) {
|
||||
error_report("Format driver '%s' does not support image creation",
|
||||
drv->format_name);
|
||||
|
@ -1560,6 +1561,7 @@ static int img_convert(int argc, char **argv)
|
|||
if (ret < 0) {
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
/* Get backing file name if -o backing_file was used */
|
||||
out_baseimg_param = qemu_opt_get(opts, BLOCK_OPT_BACKING_FILE);
|
||||
|
|
Loading…
Reference in New Issue