diff mbox

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

Message ID 1401482511-9647-5-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass May 30, 2014, 8:41 p.m. UTC
The return code is not consistent with cli_simple_run_command_list(). For the
last command in a sequence, the return code is actually inverted.

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

Changes in v2:
- Rebase to master

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

Comments

Tom Rini June 5, 2014, 10:48 p.m. UTC | #1
On Fri, May 30, 2014 at 02:41:51PM -0600, Simon Glass wrote:

> The return code is not consistent with cli_simple_run_command_list(). For the
> last command in a sequence, the return code is actually inverted.
> 
> Fix it.
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/common/cli_simple.c b/common/cli_simple.c
index 413c2eb..49d5833 100644
--- a/common/cli_simple.c
+++ b/common/cli_simple.c
@@ -331,7 +331,7 @@  int cli_simple_run_command_list(char *cmd, int flag)
 		++next;
 	}
 	if (rcode == 0 && *line)
-		rcode = (cli_simple_run_command(line, 0) >= 0);
+		rcode = (cli_simple_run_command(line, 0) < 0);
 
 	return rcode;
 }