]> xenbits.xensource.com Git - libvirt.git/commit
vsh: Fix '--help' option for virsh/virt-admin
authorPeter Krempa <pkrempa@redhat.com>
Wed, 15 May 2024 06:42:57 +0000 (08:42 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 16 May 2024 07:03:48 +0000 (09:03 +0200)
commit811ce0e13b6d319df54e86b8c698e45cfbd8b940
tree3b424e982abb2daab58633a2eb480c53efbda2f8
parent8b133e82fc62188b04dcdb2ddfc5589a48222a2c
vsh: Fix '--help' option for virsh/virt-admin

The refactor of the libvirt tools command parser introduced a bug where
the '--help' option would cause an error:

 $ virsh list --help
 error: command 'list' doesn't support option --help

rather than printing the help for the command as the help option is
supposed to be handled separately from the real options.

Re-introduce the separate handling to the new parser code.

Fixes: 5540c3d2415c194b206f8946cf74b13648163332
Resolves: https://issues.redhat.com/browse/RHEL-36565
Reported-by: Lili Zhu <lizhu@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
tools/vsh.c