On 06/13/2016 10:58 AM, Denis V. Lunev wrote: > This is necessary to enable creation of common qemu-img options which will > be specified before command. > > The patch also enables '-V' alias to '--version' (exactly like in other > block utilities) and documents this change. > > Signed-off-by: Denis V. Lunev <d...@openvz.org> > CC: Eric Blake <ebl...@redhat.com> > CC: Paolo Bonzini <pbonz...@redhat.com> > CC: Stefan Hajnoczi <stefa...@redhat.com> > CC: Kevin Wolf <kw...@redhat.com> > --- > qemu-img.c | 39 ++++++++++++++++++++++++++------------- > qemu-img.texi | 10 +++++++++- > 2 files changed, 35 insertions(+), 14 deletions(-) > > diff --git a/qemu-img.c b/qemu-img.c > index 4b56ad3..d22ebdf 100644 > --- a/qemu-img.c > +++ b/qemu-img.c > @@ -87,9 +87,12 @@ static void QEMU_NORETURN help(void) > { > const char *help_msg = > QEMU_IMG_VERSION > - "usage: qemu-img command [command options]\n" > + "usage: qemu-img [standard options] command [command options]\n" > "QEMU disk image utility\n" > "\n" > + " '-h', '--help' display this help and exit\n" > + " '-V', '--version' output version information and exit\n" > + "\n" > "Command syntax:\n" > #define DEF(option, callback, arg_string) \ > " " arg_string "\n" > @@ -3476,7 +3479,7 @@ int main(int argc, char **argv) > int c; > static const struct option long_options[] = { > {"help", no_argument, 0, 'h'}, > - {"version", no_argument, 0, 'v'}, > + {"version", no_argument, 0, 'V'},
I guess it doesn't hurt to change to '-V', since neither '-v' nor '-V' worked prior to the patch. Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature