aboutsummaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
authorMarkus Klotzbuecher <mk@denx.de>2006-03-24 15:43:16 +0100
committerMarkus Klotzbücher <mk@pollux.denx.de>2006-03-24 15:43:16 +0100
commit2770bcb21c82835a5351176e5b2a9221d7fc8ef9 (patch)
tree78edf9afc584e1a76d219bd64d260224a84f0d10 /common/main.c
parent0b953ffc653fc5ab3d3fa47abf0dd9b8bd0703f5 (diff)
parent05d8dce9d07cf4073ea15fbc448c1ce22b6baf0f (diff)
Merge with http://www.denx.de/git/u-boot.git
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/common/main.c b/common/main.c
index f042f3a63..445cb1849 100644
--- a/common/main.c
+++ b/common/main.c
@@ -919,7 +919,10 @@ int run_command (const char *cmd, int flag)
process_macros (token, finaltoken);
/* Extract arguments */
- argc = parse_line (finaltoken, argv);
+ if ((argc = parse_line (finaltoken, argv)) == 0) {
+ rc = -1; /* no command at all */
+ continue;
+ }
/* Look up command in command table */
if ((cmdtp = find_cmd(argv[0])) == NULL) {
@@ -945,9 +948,9 @@ int run_command (const char *cmd, int flag)
puts ("'bootd' recursion detected\n");
rc = -1;
continue;
- }
- else
+ } else {
flag |= CMD_FLAG_BOOTD;
+ }
}
#endif /* CFG_CMD_BOOTD */