On 17.03.2017 11:45, Stefan Hajnoczi wrote: > Printing the full help output obscures the error message for an invalid > command-line option or missing argument. > > Before this patch: > > $ ./qemu-img --foo > ...pages of output... > > After this patch: > > $ ./qemu-img --foo > qemu-img: unrecognized option '--foo' > Try 'qemu-img --help' for more information > > This patch adds the getopt ':' character so that it can distinguish > between missing arguments and unrecognized options. This helps provide > more detailed error messages. > > Suggested-by: Max Reitz <mre...@redhat.com> > Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> > --- > qemu-img.c | 117 > ++++++++++++++++++++++++++++++++++++++++++++++++++----------- > 1 file changed, 97 insertions(+), 20 deletions(-)
Uh, right, this was pretty much pre-existing. Then even more so thanks for this patch. :-) Reviewed-by: Max Reitz <mre...@redhat.com>
signature.asc
Description: OpenPGP digital signature