summaryrefslogtreecommitdiffstats
path: root/common/command.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-11-01 15:13:05 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-11-01 16:31:07 +0100
commit907e3ff3e631dfb805258df830bdb9c967a1bf16 (patch)
tree614b0d102ae8d3625de659ed7b491de0e46cfc27 /common/command.c
parentd357612bc1584f7fb3fe2c5b97ea1d256e10f1c9 (diff)
downloadbarebox-907e3ff3e631dfb805258df830bdb9c967a1bf16.tar.gz
barebox-907e3ff3e631dfb805258df830bdb9c967a1bf16.tar.xz
command: return 1 on unknown command
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 <s.hauer@pengutronix.de>
Diffstat (limited to 'common/command.c')
-rw-r--r--common/command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/command.c b/common/command.c
index 873b3ff6f4..7f2b777939 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);