From ffd8e8ffd5410ecea17c62785bf445b7ecddd8d6 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 9 Aug 2019 11:09:21 +0200 Subject: 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 Reviewed-by: Max Reitz Reviewed-by: John Snow Reviewed-by: Eric Blake --- qemu-img.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qemu-img.c') diff --git a/qemu-img.c b/qemu-img.c index 7998377..d9321f6 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -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; -- cgit v1.1