summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-02-27 12:23:29 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2014-03-07 07:41:26 +0100
commit93578fb2333bba3d1c2d0fa41de11ba4f92f9aed (patch)
tree0ded5f8c7eff310f441fe2cf1c939bbe3a86291b /common
parent3ea30d9ce892a66d5161acd8afb24b755e3f2045 (diff)
downloadbarebox-93578fb2333bba3d1c2d0fa41de11ba4f92f9aed.tar.gz
run_command: remove unused flag parameter
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
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 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"));
}
}