diff options
author | Pierre-Alexandre Meyer <pierre@mouraf.org> | 2009-04-26 23:17:19 -0700 |
---|---|---|
committer | Pierre-Alexandre Meyer <pierre@mouraf.org> | 2009-04-26 23:17:19 -0700 |
commit | 6240ecadc145ce1a7b9955e0de08d5faeedc45e5 (patch) | |
tree | 1655558ce8dd703673746995030fdab266a5f076 | |
parent | 777cc79b1a189878c9eeef41cfa396968fa247cd (diff) | |
download | hdt-6240ecadc145ce1a7b9955e0de08d5faeedc45e5.tar.gz hdt-6240ecadc145ce1a7b9955e0de08d5faeedc45e5.tar.xz hdt-6240ecadc145ce1a7b9955e0de08d5faeedc45e5.zip |
hdt: Fix modules lookup to compare against full callback name (CLI)
Impact: remove auto-aliases feature but fix potential bug
Comparing the first letters of the supplied command to look for
the callback was interesting, since it added aliases automatically
(`show bi' matched `show bios'). Unfortunately, that caused some issues
in certain situation (`show disk' matching `show disks').
Removing the feature.
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
-rw-r--r-- | com32/hdt/hdt-cli.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/hdt/hdt-cli.c b/com32/hdt/hdt-cli.c index 324c74ae..6df2818f 100644 --- a/com32/hdt/hdt-cli.c +++ b/com32/hdt/hdt-cli.c @@ -439,7 +439,7 @@ void find_cli_callback_descr(const char* module_name, while (modules_list->modules[modules_iter].name && strncmp(module_name, modules_list->modules[modules_iter].name, - module_len) != 0) + strlen(modules_list->modules[modules_iter].name)) != 0) modules_iter++; if (modules_list->modules[modules_iter].name) { |