nand-image-builder: Fix --help/-h option

--help/-h is not working correctly (it's printing the help context on
stderr instead of stdout).
Adding a valid shortcut for --help solves the problem.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Bernhard Nortmann <bernhard.nortmann@web.de>
This commit is contained in:
Boris Brezillon 2016-06-03 17:35:08 +02:00
parent 35fb99c095
commit fe299a32ab

View File

@ -1032,7 +1032,7 @@ int main(int argc, char **argv)
int option_index = 0;
char *endptr = NULL;
static const struct option long_options[] = {
{"help", no_argument, 0, 0},
{"help", no_argument, 0, 'h'},
{"ecc", required_argument, 0, 'c'},
{"page", required_argument, 0, 'p'},
{"oob", required_argument, 0, 'o'},
@ -1044,7 +1044,7 @@ int main(int argc, char **argv)
{0, 0, 0, 0},
};
int c = getopt_long(argc, argv, "c:p:o:u:e:ba:s",
int c = getopt_long(argc, argv, "c:p:o:u:e:ba:sh",
long_options, &option_index);
if (c == EOF)
break;