qemu-img: show help for invalid global options
The qemu-img sub-command executes regardless of invalid global options:
$ qemu-img --foo info test.img
qemu-img: unrecognized option '--foo'
image: test.img
...
The unrecognized option warning may be missed by the user. This can
hide incorrect command-lines in scripts and confuse users.
This patch prints the help information and terminates instead of
executing the sub-command.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Message-id:
20170317104541[email protected]
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Max Reitz <[email protected]>