Skip to contentSkip to conversation

crc exit with COMMAND_ERROR_USAGE

PATCH New Jan Weitzel 1 participant 1 message Dec 5, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 commands/crc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
commands/crc.c +2 -0
index 01fedd7..8ce97da 100644
@@ -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;
 		}
 	}
 
Signature · 7 lines
1.7.0.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox