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:
parent
d357612bc1
commit
907e3ff3e6
|
@ -85,7 +85,7 @@ int execute_command(int argc, char **argv)
|
||||||
#else
|
#else
|
||||||
printf ("Unknown command '%s'\n", argv[0]);
|
printf ("Unknown command '%s'\n", argv[0]);
|
||||||
#endif
|
#endif
|
||||||
ret = -1; /* give up after bad command */
|
ret = 1; /* give up after bad command */
|
||||||
}
|
}
|
||||||
|
|
||||||
getopt_context_restore(&gc);
|
getopt_context_restore(&gc);
|
||||||
|
|
Loading…
Reference in New Issue