diff options
author | Simon Glass <sjg@chromium.org> | 2012-02-14 19:59:19 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2012-03-06 21:09:18 +0100 |
commit | f47360a74ec05c078960bf6f8c10a7f426c7d11d (patch) | |
tree | da8f3b450fa39aa0ad3966da7c2e04f243a30da7 /common | |
parent | 79714c1e26229985c2ed9dd5853b55732cb21f2c (diff) | |
download | u-boot-imx-f47360a74ec05c078960bf6f8c10a7f426c7d11d.zip u-boot-imx-f47360a74ec05c078960bf6f8c10a7f426c7d11d.tar.gz u-boot-imx-f47360a74ec05c078960bf6f8c10a7f426c7d11d.tar.bz2 |
Rename run_command() to builtin_run_command()
The current run_command() is only one of the parsing options - the other
is hush. We should not call run_command() when the hush parser is being
used. So we rename this function to better explain its purpose.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_bedbug.c | 2 | ||||
-rw-r--r-- | common/cmd_bootm.c | 2 | ||||
-rw-r--r-- | common/cmd_source.c | 4 | ||||
-rw-r--r-- | common/main.c | 9 |
4 files changed, 9 insertions, 8 deletions
diff --git a/common/cmd_bedbug.c b/common/cmd_bedbug.c index 87b108f..0228ee8 100644 --- a/common/cmd_bedbug.c +++ b/common/cmd_bedbug.c @@ -237,7 +237,7 @@ void bedbug_main_loop (unsigned long addr, struct pt_regs *regs) if (len == -1) printf ("<INTERRUPT>\n"); else - rc = run_command (lastcommand, flag); + rc = builtin_run_command(lastcommand, flag); if (rc <= 0) { /* invalid command or not repeatable, forget it */ diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index d5745b1..2e3e159 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -1046,7 +1046,7 @@ int do_bootd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) int rcode = 0; #ifndef CONFIG_SYS_HUSH_PARSER - if (run_command(getenv("bootcmd"), flag) < 0) + if (builtin_run_command(getenv("bootcmd"), flag) < 0) rcode = 1; #else if (parse_string_outer(getenv("bootcmd"), diff --git a/common/cmd_source.c b/common/cmd_source.c index 16a627a..481241c 100644 --- a/common/cmd_source.c +++ b/common/cmd_source.c @@ -179,7 +179,7 @@ source (ulong addr, const char *fit_uname) if (*line) { debug ("** exec: \"%s\"\n", line); - if (run_command (line, 0) < 0) { + if (builtin_run_command(line, 0) < 0) { rcode = 1; break; } @@ -189,7 +189,7 @@ source (ulong addr, const char *fit_uname) ++next; } if (rcode == 0 && *line) - rcode = (run_command(line, 0) >= 0); + rcode = (builtin_run_command(line, 0) >= 0); } #endif free (cmd); diff --git a/common/main.c b/common/main.c index defe2d4..e74ebdf 100644 --- a/common/main.c +++ b/common/main.c @@ -274,9 +274,10 @@ int run_command2(const char *cmd, int flag) { #ifndef CONFIG_SYS_HUSH_PARSER /* - * run_command can return 0 or 1 for success, so clean up its result. + * builtin_run_command can return 0 or 1 for success, so clean up + * its result. */ - if (run_command(cmd, flag) == -1) + if (builtin_run_command(cmd, flag) == -1) return 1; return 0; @@ -457,7 +458,7 @@ void main_loop (void) if (len == -1) puts ("<INTERRUPT>\n"); else - rc = run_command (lastcommand, flag); + rc = builtin_run_command(lastcommand, flag); if (rc <= 0) { /* invalid command or not repeatable, forget it */ @@ -1278,7 +1279,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 builtin_run_command(const char *cmd, int flag) { cmd_tbl_t *cmdtp; char cmdbuf[CONFIG_SYS_CBSIZE]; /* working copy of cmd */ |