hdt: Refactor help option; Cleanups
authorPierre-Alexandre Meyer <pierre@mouraf.org>
Sat, 21 Mar 2009 15:58:44 +0000 (08:58 -0700)
committerPierre-Alexandre Meyer <pierre@mouraf.org>
Sat, 21 Mar 2009 15:58:44 +0000 (08:58 -0700)
commit5276e1ac49f4ea445b326e5df5cc183023d5b985
tree01236698b4c6a8fb73912be2cb4124efe0ddbc3f
parent8023e04cf0a564fabf37bbc68f431b08df6921d5
hdt: Refactor help option; Cleanups

Impact: Help is usable in all modes, cleanups.

Help is now a generique helper that is shared by all modes.
It prints:
* default commands for the current mode
* the list of modules associated to show for the current mode
* default commands for hdt

For the last item, it doesn't print overwritten commands, e.g. if the
dmi module implements a generic 'list' command and there is a generic,
shared, 'list' command in the hdt mode, the former overwrites the
latter.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
com32/hdt/hdt-cli.c