]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Correct return code from builtin_run_command_list()
authorSimon Glass <sjg@chromium.org>
Fri, 30 May 2014 20:41:51 +0000 (14:41 -0600)
committerTom Rini <trini@ti.com>
Thu, 5 Jun 2014 18:38:38 +0000 (14:38 -0400)
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>
common/cli_simple.c

index 413c2eb89ec26fb5d68522ac33e0eddbf679dee2..49d58339286deb0ba5ca3e49708b850fcb1c0391 100644 (file)
@@ -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;
 }