]> www.infradead.org Git - mtd-utils.git/commitdiff
ubi-utils: fixed and enhanced '--flash-image' option
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>
Mon, 25 Aug 2008 19:09:50 +0000 (21:09 +0200)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 26 Aug 2008 07:02:14 +0000 (10:02 +0300)
The '--flash-image' option of 'ubiformat' requires an argument and
'.has_arg' must not be 0 hence.  The patch adds this option to the
commandline synopsis too.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
ubi-utils/new-utils/src/ubiformat.c

index 1fa14b341549ab5c0b460d14e5648a185433c759..c2888e0a75898a0f645b10f780ac7df237513426 100644 (file)
@@ -92,7 +92,8 @@ static const char *usage =
 "\t\t\t[-x <num>] [-E <value>] [-s <bytes>] [-O <offs>] [-n]\n"
 "\t\t\t[--help] [--version] [--yes] [--verbose] [--quiet]\n"
 "\t\t\t[--ec=<value>] [--vid-hdr-offset=<offs>]\n"
-"\t\t\t[--ubi-ver=<num>] [--no-volume-table]\n\n"
+"\t\t\t[--ubi-ver=<num>] [--no-volume-table]\n"
+"\t\t\t[--flash-image=<file>]\n\n"
 
 "Example 1: " PROGRAM_NAME " /dev/mtd0 -y - format MTD device number 0 and do\n"
 "           not ask questions.\n"
@@ -103,7 +104,7 @@ static const struct option long_options[] = {
        { .name = "sub-page-size",   .has_arg = 1, .flag = NULL, .val = 's' },
        { .name = "vid-hdr-offset",  .has_arg = 1, .flag = NULL, .val = 'O' },
        { .name = "no-volume-table", .has_arg = 0, .flag = NULL, .val = 'n' },
-       { .name = "flash-image",     .has_arg = 0, .flag = NULL, .val = 'f' },
+       { .name = "flash-image",     .has_arg = 1, .flag = NULL, .val = 'f' },
        { .name = "yes",             .has_arg = 0, .flag = NULL, .val = 'y' },
        { .name = "erase-counter",   .has_arg = 1, .flag = NULL, .val = 'e' },
        { .name = "quiet",           .has_arg = 0, .flag = NULL, .val = 'q' },