[U-Boot] [PATCH 4/4] Correct return code from builtin_run_command_list()

Simon Glass sjg at chromium.org
Sat May 24 05:11:35 CEST 2014


The return code is not consistent with builtin_run_command_list(). For the
last command in a sequence, the return code is actually inverted.

Fix it.
Signed-off-by: Simon Glass <sjg at chromium.org>
---

 common/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/main.c b/common/main.c
index 9bee7bd..e2350bd 100644
--- a/common/main.c
+++ b/common/main.c
@@ -1485,7 +1485,7 @@ static int builtin_run_command_list(char *cmd, int flag)
 		++next;
 	}
 	if (rcode == 0 && *line)
-		rcode = (builtin_run_command(line, 0) >= 0);
+		rcode = (builtin_run_command(line, 0) < 0);
 
 	return rcode;
 }
-- 
1.9.1.423.g4596e3a



More information about the U-Boot mailing list