diff options
author | Kevin Wolf <kwolf@redhat.com> | 2019-08-09 11:09:21 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2019-08-16 10:25:16 +0200 |
commit | ffd8e8ffd5410ecea17c62785bf445b7ecddd8d6 (patch) | |
tree | 3670000e635382419fbc7bee20a13c1e71a53d50 /qemu-img.c | |
parent | cf3129323f900ef5ddbccbe86e4fa801e88c566e (diff) | |
download | qemu-ffd8e8ffd5410ecea17c62785bf445b7ecddd8d6.zip qemu-ffd8e8ffd5410ecea17c62785bf445b7ecddd8d6.tar.gz qemu-ffd8e8ffd5410ecea17c62785bf445b7ecddd8d6.tar.bz2 |
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>
Diffstat (limited to 'qemu-img.c')
-rw-r--r-- | qemu-img.c | 5 |
1 files changed, 5 insertions, 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; |