diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-11-01 15:13:05 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-11-01 16:31:07 +0100 |
commit | 907e3ff3e631dfb805258df830bdb9c967a1bf16 (patch) | |
tree | 614b0d102ae8d3625de659ed7b491de0e46cfc27 /common/command.c | |
parent | d357612bc1584f7fb3fe2c5b97ea1d256e10f1c9 (diff) | |
download | barebox-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.c | 2 |
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); |