summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--commands/boot.c2
-rw-r--r--commands/exec.c2
-rw-r--r--commands/login.c2
-rw-r--r--commands/time.c2
-rw-r--r--common/hush.c2
-rw-r--r--common/menu.c2
-rw-r--r--common/parser.c7
-rw-r--r--common/startup.c4
-rw-r--r--fs/fs.c2
-rw-r--r--include/common.h3
10 files changed, 13 insertions, 15 deletions
diff --git a/commands/boot.c b/commands/boot.c
index c4b49a9..fea7b54 100644
--- a/commands/boot.c
+++ b/commands/boot.c
@@ -47,7 +47,7 @@ static int boot_script(char *path)
globalvar_set_match("linux.bootargs.dyn.", "");
globalvar_set_match("bootm.", "");
- ret = run_command(path, 0);
+ ret = run_command(path);
if (ret) {
printf("Running %s failed\n", path);
goto out;
diff --git a/commands/exec.c b/commands/exec.c
index bd7d54a..8d12b30 100644
--- a/commands/exec.c
+++ b/commands/exec.c
@@ -39,7 +39,7 @@ static int do_exec(int argc, char *argv[])
if (!script)
return 1;
- if (run_command (script, 0) == -1)
+ if (run_command(script) == -1)
goto out;
free(script);
}
diff --git a/commands/login.c b/commands/login.c
index b616bf1..d9297fa 100644
--- a/commands/login.c
+++ b/commands/login.c
@@ -68,7 +68,7 @@ static int do_login(int argc, char *argv[])
if (passwd_len < 0) {
console_allow_input(false);
- run_command(timeout_cmd, 0);
+ run_command(timeout_cmd);
}
if (check_passwd(passwd, passwd_len))
diff --git a/commands/time.c b/commands/time.c
index 987c25e..2cc3292 100644
--- a/commands/time.c
+++ b/commands/time.c
@@ -27,7 +27,7 @@ static int do_time(int argc, char *argv[])
start = get_time_ns();
- run_command(buf, 0);
+ run_command(buf);
end = get_time_ns();
diff --git a/common/hush.c b/common/hush.c
index abe2ced..bd534c1 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 ef56190..114c36e 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 d390fb6..4a48210 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 0b5fe46..04f8cf0 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"));
}
}
diff --git a/fs/fs.c b/fs/fs.c
index 7a57bc0..bb849cb 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -434,7 +434,7 @@ static void automount_mount(const char *path, int instat)
setenv("automount_path", am->path);
export("automount_path");
- ret = run_command(am->cmd, 0);
+ ret = run_command(am->cmd);
setenv("automount_path", NULL);
if (ret)
diff --git a/include/common.h b/include/common.h
index 293f504..6987b4f 100644
--- a/include/common.h
+++ b/include/common.h
@@ -92,8 +92,7 @@ void __noreturn panic(const char *fmt, ...);
char *size_human_readable(unsigned long long size);
-/* common/main.c */
-int run_command (const char *cmd, int flag);
+int run_command(const char *cmd);
int readline (const char *prompt, char *buf, int len);
/* common/memsize.c */