diff options
author | Jan Weitzel <j.weitzel@phytec.de> | 2011-12-05 13:46:24 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-12-05 17:53:09 +0100 |
commit | 019e55f4f7b94b2178d65c17a7386277c799993f (patch) | |
tree | 65e2820d6ddeef996282ab26ae5647e21a144a41 /commands | |
parent | d24e4fcb99b2f694f9d2a6d37caa811d3733b4f7 (diff) | |
download | barebox-019e55f4f7b94b2178d65c17a7386277c799993f.tar.gz barebox-019e55f4f7b94b2178d65c17a7386277c799993f.tar.xz |
crc exit with COMMAND_ERROR_USAGE
If parameter -v without a crc is used, you got a notice but the crc is
calculated and exit status is 0.
With wrong parameters we should quite with COMMAND_ERROR_USAGE.
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/crc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/commands/crc.c b/commands/crc.c index 01fedd7c65..8ce97da530 100644 --- a/commands/crc.c +++ b/commands/crc.c @@ -108,6 +108,8 @@ static int do_crc(struct command *cmdtp, int argc, char *argv[]) verify = 1; vcrc = simple_strtoul(optarg, NULL, 0); break; + default: + return COMMAND_ERROR_USAGE; } } |