mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
* Fix data abort exception handling for arm920t CPU
* Fix alignment problems with flash driver for TRAB board * Patch by Donald White, 21 May 2003: fix calculation of base address in pci_hose_config_device() * Fix bug in command line parsing: "cmd1;cmd2" is supposed to always execute "cmd2", even if "cmd1" fails. Note that this is different to "run var1 var2" where the contents of "var2" will NOT be executed when a command in "var1" fails.
This commit is contained in:
@@ -746,9 +746,9 @@ int run_command (const char *cmd, int flag)
|
||||
char finaltoken[CFG_CBSIZE];
|
||||
char *str = cmdbuf;
|
||||
char *argv[CFG_MAXARGS + 1]; /* NULL terminated */
|
||||
int argc;
|
||||
int argc, inquotes;
|
||||
int repeatable = 1;
|
||||
int inquotes;
|
||||
int rc = 0;
|
||||
|
||||
#ifdef DEBUG_PARSER
|
||||
printf ("[RUN_COMMAND] cmd[%p]=\"", cmd);
|
||||
@@ -817,13 +817,15 @@ int run_command (const char *cmd, int flag)
|
||||
/* Look up command in command table */
|
||||
if ((cmdtp = find_cmd(argv[0])) == NULL) {
|
||||
printf ("Unknown command '%s' - try 'help'\n", argv[0]);
|
||||
return -1; /* give up after bad command */
|
||||
rc = -1; /* give up after bad command */
|
||||
continue;
|
||||
}
|
||||
|
||||
/* found - check max args */
|
||||
if (argc > cmdtp->maxargs) {
|
||||
printf ("Usage:\n%s\n", cmdtp->usage);
|
||||
return -1;
|
||||
rc = -1;
|
||||
continue;
|
||||
}
|
||||
|
||||
#if (CONFIG_COMMANDS & CFG_CMD_BOOTD)
|
||||
@@ -834,7 +836,8 @@ int run_command (const char *cmd, int flag)
|
||||
#endif
|
||||
if (flag & CMD_FLAG_BOOTD) {
|
||||
printf ("'bootd' recursion detected\n");
|
||||
return -1;
|
||||
rc = -1;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
flag |= CMD_FLAG_BOOTD;
|
||||
@@ -843,7 +846,7 @@ int run_command (const char *cmd, int flag)
|
||||
|
||||
/* OK - call function to do the command */
|
||||
if ((cmdtp->cmd) (cmdtp, flag, argc, argv) != 0) {
|
||||
return (-1);
|
||||
rc = -1;
|
||||
}
|
||||
|
||||
repeatable &= cmdtp->repeatable;
|
||||
@@ -853,7 +856,7 @@ int run_command (const char *cmd, int flag)
|
||||
return 0; /* if stopped then not repeatable */
|
||||
}
|
||||
|
||||
return repeatable;
|
||||
return rc ? rc : repeatable;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
Reference in New Issue
Block a user