summaryrefslogtreecommitdiffstats
path: root/common/command.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-10-20 03:52:39 -0400
committerWolfgang Denk <wd@denx.de>2010-11-28 21:49:27 +0100
commit722b061b6f6f3405118f2969272511e7e19990e3 (patch)
tree95224fa696a76e33424bb60114234da3618db7c6 /common/command.c
parent882b7d726febe65579d6502c271412ecb05821d7 (diff)
downloadbootable_bootloader_goldelico_gta04-722b061b6f6f3405118f2969272511e7e19990e3.zip
bootable_bootloader_goldelico_gta04-722b061b6f6f3405118f2969272511e7e19990e3.tar.gz
bootable_bootloader_goldelico_gta04-722b061b6f6f3405118f2969272511e7e19990e3.tar.bz2
autocomplete: remove runtime handler install
Rather than add runtime overhead of installing completion handlers, do it statically at build time. This requires a new build time helper macro to declare a command and the completion handler at the same time. Then we convert the env related funcs over to this. This gives an opportunity to also unify the U_BOOT_CMD macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'common/command.c')
-rw-r--r--common/command.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/common/command.c b/common/command.c
index 0b1a3fb..ef4a081 100644
--- a/common/command.c
+++ b/common/command.c
@@ -177,30 +177,6 @@ int var_complete(int argc, char * const argv[], char last_char, int maxv, char *
return 0;
}
-static void install_auto_complete_handler(const char *cmd,
- int (*complete)(int argc, char * const argv[], char last_char, int maxv, char *cmdv[]))
-{
- cmd_tbl_t *cmdtp;
-
- cmdtp = find_cmd(cmd);
- if (cmdtp == NULL)
- return;
-
- cmdtp->complete = complete;
-}
-
-void install_auto_complete(void)
-{
-#if defined(CONFIG_CMD_EDITENV)
- install_auto_complete_handler("editenv", var_complete);
-#endif
- install_auto_complete_handler("printenv", var_complete);
- install_auto_complete_handler("setenv", var_complete);
-#if defined(CONFIG_CMD_RUN)
- install_auto_complete_handler("run", var_complete);
-#endif
-}
-
/*************************************************************************************/
static int complete_cmdv(int argc, char * const argv[], char last_char, int maxv, char *cmdv[])