]> xenbits.xensource.com Git - libvirt.git/commit
vshCmddefHelp: Refactor and fix printing of help for _STRING/_INT arguments
authorPeter Krempa <pkrempa@redhat.com>
Tue, 5 Mar 2024 15:53:55 +0000 (16:53 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 13 Mar 2024 14:02:52 +0000 (15:02 +0100)
commit36132ff9841cdc8171a01a8ad6e95560dbc7973e
tree3a09df2262c05b4350df98d6d039b21f352f88b1
parente177b0fca66f569cb05ce408b36a5d248f95b0e2
vshCmddefHelp: Refactor and fix printing of help for _STRING/_INT arguments

Use the new flags to do the decisions which will also fix the case when
an _INT option is required but non-positional.

This fixes the help for the 'timeout' argument of 'daemon-timeout'
virt-admin command:

     SYNOPSIS
  -    daemon-timeout <timeout>
  +    daemon-timeout --timeout <number>

[...]
     OPTIONS
  -    [--timeout] <number>  number of seconds the daemon will run without any active connection
  +    --timeout <number>  number of seconds the daemon will run without any active connection

Resolves: https://issues.redhat.com/browse/RHEL-25993
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tools/vsh.c