From 005ce6fef618bfe6e724a31b9bf7acd6cc655513 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 5 Jul 2007 18:01:51 +0200 Subject: svn_rev_412 remove repeatable commands --- common/parser.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'common/parser.c') diff --git a/common/parser.c b/common/parser.c index 5716a13212..23f2a377a9 100644 --- a/common/parser.c +++ b/common/parser.c @@ -159,9 +159,7 @@ static void process_macros (const char *input, char *output) /**************************************************************************** * returns: - * 1 - command executed, repeatable - * 0 - command executed but not repeatable, interrupted commands are - * always considered not repeatable + * 0 - command executed * -1 - not executed (unrecognized, bootd recursion or too many args) * (If cmd is NULL or "" or longer than CONFIG_CBSIZE-1 it is * considered unrecognized) @@ -184,7 +182,6 @@ int run_command (const char *cmd, int flag) char *str = cmdbuf; char *argv[CONFIG_MAXARGS + 1]; /* NULL terminated */ int argc, inquotes; - int repeatable = 1; int rc = 0; #ifdef DEBUG_PARSER @@ -193,8 +190,6 @@ int run_command (const char *cmd, int flag) puts ("\"\n"); #endif - clear_ctrlc(); /* forget any previous Control C */ - if (!cmd || !*cmd) { return -1; /* empty command */ } @@ -285,18 +280,11 @@ int run_command (const char *cmd, int flag) #endif /* CFG_CMD_BOOTD */ /* OK - call function to do the command */ - if ((cmdtp->cmd) (cmdtp, flag, argc, argv) != 0) { + if ((cmdtp->cmd) (cmdtp, flag, argc, argv) != 0) rc = -1; - } - - repeatable &= cmdtp->repeatable; - - /* Did the user stop this? */ - if (had_ctrlc ()) - return 0; /* if stopped then not repeatable */ } - return rc ? rc : repeatable; + return rc; } /****************************************************************************/ -- cgit v1.2.3