]> www.infradead.org Git - mtd-utils.git/commitdiff
ubiformat: Dont ignore sequence number CLI option
authorAmol Vengurlekar <amolsven@gmail.com>
Mon, 13 May 2019 00:59:19 +0000 (17:59 -0700)
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
Mon, 13 May 2019 06:27:22 +0000 (08:27 +0200)
Image sequence number for the UBI header can be specified for the
ubiformat tool according to the documentation and the help message for
ubiformat. The CLI option --image-seq for image sequence number is not
supported. -Q option for image sequence number is silently ignored.
This patch adds the CLI support for image sequence number.

Signed-off-by: Amol Vengurlekar <amol.sven@gmail.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
ubi-utils/ubiformat.c

index aedb27b59436649ee5242f85e23408f46fbe2ed8..a90627c9c479d3f09aaa670ec7edb0e21ca4d9d7 100644 (file)
@@ -120,6 +120,7 @@ static const struct option long_options[] = {
        { .name = "ubi-ver",         .has_arg = 1, .flag = NULL, .val = 'x' },
        { .name = "help",            .has_arg = 0, .flag = NULL, .val = 'h' },
        { .name = "version",         .has_arg = 0, .flag = NULL, .val = 'V' },
+       { .name = "image-seq",       .has_arg = 1, .flag = NULL, .val = 'Q' },
        { NULL, 0, NULL, 0},
 };
 
@@ -132,7 +133,7 @@ static int parse_opt(int argc, char * const argv[])
                int key, error = 0;
                unsigned long int image_seq;
 
-               key = getopt_long(argc, argv, "nh?Vyqve:x:s:O:f:S:", long_options, NULL);
+               key = getopt_long(argc, argv, "nh?Vyqve:x:s:O:f:S:Q:", long_options, NULL);
                if (key == -1)
                        break;