hush now prints the error value if a command returns a value < 0,
so do not return -1 (EPERM) when we encounter an unknown command.
Instead, return 1 so that hush is quiet.

Signed-off-by: Sascha Hauer <[email protected]>
---
 common/command.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/command.c b/common/command.c
index 873b3ff..7f2b777 100644
--- a/common/command.c
+++ b/common/command.c
@@ -85,7 +85,7 @@ int execute_command(int argc, char **argv)
 #else
                printf ("Unknown command '%s'\n", argv[0]);
 #endif
-               ret = -1;       /* give up after bad command */
+               ret = 1;        /* give up after bad command */
        }
 
        getopt_context_restore(&gc);
-- 
1.7.10.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to