X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fcli_simple.c;h=353ceeb7349ac144521a3838f5d66cbc2d479299;hb=24289208354c143967968755cff5c825a12e3f90;hp=3039cfcca1fe73d0a0615a64133916cd092742cd;hpb=e1bf824dfd6881f6f633238c275bfa1e5d83c433;p=u-boot diff --git a/common/cli_simple.c b/common/cli_simple.c index 3039cfcca1..353ceeb734 100644 --- a/common/cli_simple.c +++ b/common/cli_simple.c @@ -10,6 +10,7 @@ */ #include +#include #include #include @@ -255,7 +256,7 @@ int cli_simple_run_command(const char *cmd, int flag) return rc ? rc : repeatable; } -void cli_loop(void) +void cli_simple_loop(void) { static char lastcommand[CONFIG_SYS_CBSIZE] = { 0, }; @@ -264,14 +265,12 @@ void cli_loop(void) int rc = 1; for (;;) { -#ifdef CONFIG_BOOT_RETRY_TIME if (rc >= 0) { /* Saw enough of a valid command to * restart the timeout. */ - reset_cmd_timeout(); + bootretry_reset_cmd_timeout(); } -#endif len = cli_readline(CONFIG_SYS_PROMPT); flag = 0; /* assume no special flags for now */ @@ -296,7 +295,7 @@ void cli_loop(void) if (len == -1) puts("\n"); else - rc = run_command(lastcommand, flag); + rc = run_command_repeatable(lastcommand, flag); if (rc <= 0) { /* invalid command or not repeatable, forget it */ @@ -332,7 +331,7 @@ int cli_simple_run_command_list(char *cmd, int flag) ++next; } if (rcode == 0 && *line) - rcode = (cli_simple_run_command(line, 0) >= 0); + rcode = (cli_simple_run_command(line, 0) < 0); return rcode; }