mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
Check run_command() return code properly
run_command() returns 0 for success, 1 for failure. Fix places which assume that failure is indicated by a negative return code. Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
32e2c42a83
commit
73671dad49
3 changed files with 3 additions and 11 deletions
|
@ -1087,11 +1087,7 @@ U_BOOT_CMD(
|
|||
#if defined(CONFIG_CMD_BOOTD)
|
||||
int do_bootd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
{
|
||||
int rcode = 0;
|
||||
|
||||
if (run_command(getenv("bootcmd"), flag) < 0)
|
||||
rcode = 1;
|
||||
return rcode;
|
||||
return run_command(getenv("bootcmd"), flag);
|
||||
}
|
||||
|
||||
U_BOOT_CMD(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue