On 8/9/19 4:11 AM, Kevin Wolf wrote: > 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 <kw...@redhat.com> > --- > qemu-img.c | 5 +++++ > qemu-deprecated.texi | 7 +++++++ > 2 files changed, 12 insertions(+) > > diff --git a/qemu-img.c b/qemu-img.c > index 79983772de..d9321f6418 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.");
It looks a bit odd to have two output lines, where one is a phrase and the other is a full sentence. But I don't have any better ideas how to represent it, so Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature