aboutsummaryrefslogtreecommitdiffstats
path: root/common/main.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-04-05 00:53:31 +0000
committerwdenk <wdenk>2003-04-05 00:53:31 +0000
commit3e38691e8f7aa0d9b498d76c7279ddec6e4946f3 (patch)
treebec2e661298847dc5bcf9335ef31259686e882e1 /common/main.c
parent36c05a80ecbe3997abd9aa628a68dd6c0bacf681 (diff)
downloadu-boot-midas-3e38691e8f7aa0d9b498d76c7279ddec6e4946f3.tar.gz
u-boot-midas-3e38691e8f7aa0d9b498d76c7279ddec6e4946f3.tar.bz2
u-boot-midas-3e38691e8f7aa0d9b498d76c7279ddec6e4946f3.zip
* Patch by Arun Dharankar, 4 Apr 2003:
Add IDMA example code (tested on 8260 only) * Add support for Purple Board (MIPS64 5Kc) * Add support for MIPS64 5Kc CPUs * Fix missing setting of "loadaddr" and "bootfile" on ARM and MIPS * Patch by Denis Peter, 04 Apr 2003: - update MIP405-4 board * Patches by Denis Peter, 03 April 2003: - fix PCI IRQs on MPL boards - fix two more un-relocated pointer problems * Fix behaviour of "run" command: - print error message iv variable does not exist - terminate processing of arguments in case of error * Patches by Peter Figuli, 10 Mar 2003 - Add support for BTUART on PXA platform - Add support for WEP EP250 (PXA) board * Fix flash problems on INCA-IP; add tool to allow bruning images to flash using a BDI2000 * Implement fix for I2C Edge Conditions problem for all boards that use the bit-banging driver (common/soft_i2c.c) * Add patches by Robert Schwebel, 31 Mar 2003: - csb226 board: bring in sync with innokom/memsetup.S - csb226 board: fix MDREFR handling - misc doc fixes / extensions - innokom board: cleanup, MDREFR fix in memsetup.S, config update - add BOOT_PROGRESS to armlinux.c
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/common/main.c b/common/main.c
index e32845e471..33d871771b 100644
--- a/common/main.c
+++ b/common/main.c
@@ -862,7 +862,6 @@ int run_command (const char *cmd, int flag)
int do_run (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
{
int i;
- int rcode = 1;
if (argc < 2) {
printf ("Usage:\n%s\n", cmdtp->usage);
@@ -870,13 +869,21 @@ int do_run (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
}
for (i=1; i<argc; ++i) {
+ char *arg;
+
+ if ((arg = getenv (argv[i])) == NULL) {
+ printf ("## Error: \"%s\" not defined\n", argv[i]);
+ return 1;
+ }
#ifndef CFG_HUSH_PARSER
- if (run_command (getenv (argv[i]), flag) != -1) ++rcode;
+ if (run_command (arg, flag) == -1)
+ return 1;
#else
- if (parse_string_outer(getenv (argv[i]),
- FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP) == 0) ++rcode;
+ if (parse_string_outer(arg,
+ FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP) == 0)
+ return 1;
#endif
}
- return ((rcode == i) ? 0 : 1);
+ return 0;
}
-#endif
+#endif /* CFG_CMD_RUN */