summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-05 18:01:51 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-07-05 18:01:51 +0200
commit005ce6fef618bfe6e724a31b9bf7acd6cc655513 (patch)
tree9f600ffe2e55e5aa8dc668c3df5925c046915b11 /common
parentb2e140f5c823bca6b5d726360e6b0b2d848a53e7 (diff)
downloadbarebox-005ce6fef618bfe6e724a31b9bf7acd6cc655513.tar.gz
barebox-005ce6fef618bfe6e724a31b9bf7acd6cc655513.tar.xz
svn_rev_412
remove repeatable commands
Diffstat (limited to 'common')
-rw-r--r--common/parser.c18
1 files changed, 3 insertions, 15 deletions
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;
}
/****************************************************************************/