Commit fe299a32 authored by Boris Brezillon's avatar Boris Brezillon
Browse files

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: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: default avatarBernhard Nortmann <bernhard.nortmann@web.de>
parent 35fb99c0
...@@ -1032,7 +1032,7 @@ int main(int argc, char **argv) ...@@ -1032,7 +1032,7 @@ int main(int argc, char **argv)
int option_index = 0; int option_index = 0;
char *endptr = NULL; char *endptr = NULL;
static const struct option long_options[] = { static const struct option long_options[] = {
{"help", no_argument, 0, 0}, {"help", no_argument, 0, 'h'},
{"ecc", required_argument, 0, 'c'}, {"ecc", required_argument, 0, 'c'},
{"page", required_argument, 0, 'p'}, {"page", required_argument, 0, 'p'},
{"oob", required_argument, 0, 'o'}, {"oob", required_argument, 0, 'o'},
...@@ -1044,7 +1044,7 @@ int main(int argc, char **argv) ...@@ -1044,7 +1044,7 @@ int main(int argc, char **argv)
{0, 0, 0, 0}, {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); long_options, &option_index);
if (c == EOF) if (c == EOF)
break; break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment