]> git.ipfire.org Git - thirdparty/libvirt.git/commit
vsh: Drop redundant definition searches from vshCmd{def,Grp}Help
authorErik Skultety <eskultet@redhat.com>
Thu, 25 Jan 2018 15:08:46 +0000 (16:08 +0100)
committerErik Skultety <eskultet@redhat.com>
Thu, 25 Jan 2018 15:20:27 +0000 (16:20 +0100)
commitda60878c4cb4cb4b47c4774a1d52c93a086aa0df
treeff41197521991573f281bb910b8b8bdc5f7c9b03
parent7697706135562121732a5ddb5574a4afb269645f
vsh: Drop redundant definition searches from vshCmd{def,Grp}Help

These helpers are called from a single place only - cmdHelp wrapper and
just before the wrapper invokes the helpers, it performs the search,
either for command group or for the command itself, except the result is
discarded and the helper therefore needs to do it again. Drop this
inefficient handling and pass the @def structure rather than a name,
thus preventing the helper from needing to perform the search again.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
tools/vsh.c
tools/vsh.h