9
0
Fork 0

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>
This commit is contained in:
Sascha Hauer 2012-11-01 15:13:05 +01:00
parent d357612bc1
commit 907e3ff3e6
1 changed files with 1 additions and 1 deletions

View File

@ -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);