]> xenbits.xensource.com Git - libvirt.git/commit
tools: vshCmddefCheckInternals: Port mandatory options check from vshCmddefOptParse
authorPeter Krempa <pkrempa@redhat.com>
Thu, 12 Nov 2020 12:30:29 +0000 (13:30 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 13 Nov 2020 10:12:29 +0000 (11:12 +0100)
commitfa7265e1274bf719d9979467529e8b3336a79e75
tree1149797a74c948d0b3b7487cb8dbaee2e0f0abd9
parentb070332261fe3d9c1e30c0d853cbe94e7db39b79
tools: vshCmddefCheckInternals: Port mandatory options check from vshCmddefOptParse

'vshCmddefCheckInternals' is the go-to place for all checks related to
the definition of parameters for commands, but the check that all
mandatory parameters must be ordered before optional parameters was
still only in vshCmddefOptParse.

Adding a non-compliant option would not be caught by our test suite as
'virsh self-test' doesn't call vshCmddefOptParse.

Re-implement the check in vshCmddefCheckInternals.

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