From: Artem Bityutskiy Date: Tue, 31 May 2011 05:07:41 +0000 (+0300) Subject: ubi-utils: ubimkvol: fix parameters parsing regression X-Git-Tag: v1.4.5~31 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7df62e8e9bb1f77ca0890cc757bd20a6f33a7fbc;p=mtd-utils.git ubi-utils: ubimkvol: fix parameters parsing regression Commit 924862c864da0b62cf93ba7abf2dc78a7e6ac48f broke ubimkvol parrameters parsing by initializing the 'error' parameter of 'simple_strtoul()' to 1 instead of 0. This patch fixes the issue. Signed-off-by: Artem Bityutskiy --- diff --git a/ubi-utils/src/ubimkvol.c b/ubi-utils/src/ubimkvol.c index db71e2f..935f068 100644 --- a/ubi-utils/src/ubimkvol.c +++ b/ubi-utils/src/ubimkvol.c @@ -121,7 +121,7 @@ static int param_sanity_check(void) static int parse_opt(int argc, char * const argv[]) { while (1) { - int key, error = 1; + int key, error = 0; key = getopt_long(argc, argv, "a:n:N:s:S:t:h?Vm", long_options, NULL); if (key == -1)