summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/hush.c2
-rw-r--r--common/menu.c2
-rw-r--r--common/parser.c7
-rw-r--r--common/startup.c4
4 files changed, 7 insertions, 8 deletions
diff --git a/common/hush.c b/common/hush.c
index abe2ceda07..bd534c12f5 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -1824,7 +1824,7 @@ static char * make_string(char ** inp)
return str;
}
-int run_command (const char *cmd, int flag)
+int run_command(const char *cmd)
{
struct p_context ctx;
int ret;
diff --git a/common/menu.c b/common/menu.c
index ef56190604..114c36efcc 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -468,7 +468,7 @@ static void menu_action_command(struct menu *m, struct menu_entry *me)
if (!s)
s = e->command;
- ret = run_command (s, 0);
+ ret = run_command(s);
if (ret < 0)
udelay(1000000);
diff --git a/common/parser.c b/common/parser.c
index d390fb6afe..4a48210c4d 100644
--- a/common/parser.c
+++ b/common/parser.c
@@ -176,7 +176,7 @@ static void process_macros (const char *input, char *output)
* creates or modifies environment variables (like "bootp" does).
*/
-int run_command (const char *cmd, int flag)
+int run_command(const char *cmd)
{
char cmdbuf[CONFIG_CBSIZE]; /* working copy of cmd */
char *token; /* start of token in cmdbuf */
@@ -265,18 +265,17 @@ int run_shell(void)
static char lastcommand[CONFIG_CBSIZE] = { 0, };
int len;
int rc = 1;
- int flag;
+
for (;;) {
len = readline (CONFIG_PROMPT, console_buffer, CONFIG_CBSIZE);
- flag = 0; /* assume no special flags for now */
if (len > 0)
strcpy (lastcommand, console_buffer);
if (len == -1)
puts ("<INTERRUPT>\n");
else
- rc = run_command (lastcommand, flag);
+ rc = run_command(lastcommand);
if (rc <= 0) {
/* invalid command or not repeatable, forget it */
diff --git a/common/startup.c b/common/startup.c
index 0b5fe46adb..04f8cf06e3 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -137,11 +137,11 @@ void __noreturn start_barebox(void)
pr_info("running /env/bin/init...\n");
if (!stat("/env/bin/init", &s)) {
- run_command("source /env/bin/init", 0);
+ run_command("source /env/bin/init");
} else {
pr_err("/env/bin/init not found\n");
if (IS_ENABLED(CONFIG_CMD_LOGIN))
- while(run_command("login -t 0", 0));
+ while(run_command("login -t 0"));
}
}