hdt: Execute hdt default callbacks in each mode if needed
authorPierre-Alexandre Meyer <pierre@mouraf.org>
Wed, 25 Mar 2009 05:37:53 +0000 (22:37 -0700)
committerPierre-Alexandre Meyer <pierre@mouraf.org>
Wed, 25 Mar 2009 05:37:53 +0000 (22:37 -0700)
commitcfdfe37709aaeb6c1b97344b453f78a14bd7df86
treea102e4b24d46814d8f93fc4732fca8dbea9aa7b4
parent1a1b0cb1c68ecd0e0f709b1c5a94d49069bf18e6
hdt: Execute hdt default callbacks in each mode if needed

Impact: One can switch modes without going back through hdt

Given a command `dmi> show foo', the ordering of callbacks is now
the following:
1/ execute module 'foo' of commands set 'show' of mode dmi
2/ execute default callback of commands set 'show' of mode dmi
3/ [NEW] execute module 'foo' of commands set 'show' of mode hdt

(2/ is executed if 1/ doesn't exist, 3/ is executed if 2/ doesn't exist
either, if 3/ doesn't exist an error is displayed).

This allows for instance to switch between modes without exiting first
to hdt.

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