mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
qemu-img convert: Deprecate using -n and -o together
bdrv_create options specified with -o have no effect when skipping image creation with -n, so this doesn't make sense. Warn against the misuse and deprecate the combination so we can make it a hard error later. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
cf3129323f
commit
ffd8e8ffd5
2 changed files with 12 additions and 0 deletions
|
@ -2231,6 +2231,11 @@ static int img_convert(int argc, char **argv)
|
|||
goto fail_getopt;
|
||||
}
|
||||
|
||||
if (skip_create && options) {
|
||||
warn_report("-o has no effect when skipping image creation");
|
||||
warn_report("This will become an error in future QEMU versions.");
|
||||
}
|
||||
|
||||
s.src_num = argc - optind - 1;
|
||||
out_filename = s.src_num >= 1 ? argv[argc - 1] : NULL;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue