#include "common.h" #include "command.h" extern int do_help(cmd_tbl_t *, int, int, char * const []); extern int do_echo(cmd_tbl_t *, int, int, char * const []); extern int do_env_print(cmd_tbl_t *, int, int, char * const []); extern int do_env_set(cmd_tbl_t *, int, int, char * const []); cmd_tbl_t cmd_tbl[] = { CMD_TBL_ITEM( echo, CONFIG_SYS_MAXARGS, 1, do_echo, "echo args to console", "[args..]\n" " - echo args to console; \\c suppresses newline" ), CMD_TBL_ITEM_COMPLETE( run, CONFIG_SYS_MAXARGS, 1, do_run, "run commands in an environment variable", "var [...]\n" " - run the commands in the environment variable(s) 'var'", var_complete ), CMD_TBL_ITEM_COMPLETE( printenv, CONFIG_SYS_MAXARGS, 1, do_env_print, "print environment variables", "\n - print [all] values of all environment variables\n" "printenv name ...\n" " - print value of environment variable 'name'", var_complete ), CMD_TBL_ITEM_COMPLETE( setenv, CONFIG_SYS_MAXARGS, 0, do_env_set, "set environment variables", "[-f] name value ...\n" " - [forcibly] set environment variable 'name' to 'value ...'\n" "setenv [-f] name\n" " - [forcibly] delete environment variable 'name'", var_complete ), CMD_TBL_ITEM( help, CONFIG_SYS_MAXARGS, 1, do_help, "print command description/usage", "\n" " - print brief description of all commands\n" "help command ...\n" " - print detailed usage of 'command'" ), /* This does not use the U_BOOT_CMD macro as ? can't be used in symbol names */ {FSTR("?"), CONFIG_SYS_MAXARGS, 1, do_help, FSTR("alias for 'help'"), #ifdef CONFIG_SYS_LONGHELP FSTR(""), #endif /* CONFIG_SYS_LONGHELP */ #ifdef CONFIG_AUTO_COMPLETE 0, #endif }, /* Mark end of table */ { 0 }, };