[PATCH] crc exit with COMMAND_ERROR_USAGE
Jan Weitzel
j.weitzel at phytec.de
Mon Dec 5 07:46:24 EST 2011
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 at phytec.de>
---
commands/crc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/commands/crc.c b/commands/crc.c
index 01fedd7..8ce97da 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;
}
}
--
1.7.0.4
More information about the barebox
mailing list