--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.brezil...@free-electrons.com>
---
 nand-image-builder.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nand-image-builder.c b/nand-image-builder.c
index 230ed0c..cb39d5d 100644
--- a/nand-image-builder.c
+++ b/nand-image-builder.c
@@ -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;
-- 
2.7.4

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to