Marc-André Lureau <[email protected]> writes:

> Describe the arguments & fix the tool name.
>
> Signed-off-by: Marc-André Lureau <[email protected]>
> ---
>  scripts/qmp/qmp-shell | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell
> index db24c87cdd..fce1ab6c49 100755
> --- a/scripts/qmp/qmp-shell
> +++ b/scripts/qmp/qmp-shell
> @@ -375,7 +375,11 @@ def die(msg):
>  def fail_cmdline(option=None):
>      if option:
>          sys.stderr.write('ERROR: bad command-line option \'%s\'\n' % option)
> -    sys.stderr.write('qemu-shell [ -v ] [ -p ] [ -H ] [ -N ] < UNIX socket 
> path> | < TCP address:port >\n')
> +    sys.stderr.write('qmp-shell [ -v ] [ -p ] [ -H ] [ -N ] < UNIX socket 
> path> | < TCP address:port >\n')
> +    sys.stderr.write('    -v     Verbose (echo command sent and received)\n')
> +    sys.stderr.write('    -p     Pretty-print JSON\n')
> +    sys.stderr.write('    -H     Use HMP interface\n')
> +    sys.stderr.write('    -N     Skip negotiate (for qemu-ga)\n')
>      sys.exit(1)
>  
>  def main():

Given Python modules like argparse, doing option parsing by hand is
basically stupid.  I'll take this patch anyway, because it improves help
without making the program appreciably stupider.

Reply via email to