]> www.infradead.org Git - mtd-utils.git/commitdiff
jffs2dump: rewrite --help output to be more suitable for help2man
authorTimo Juhani Lindfors <timo.lindfors@iki.fi>
Mon, 27 Jul 2009 21:05:30 +0000 (00:05 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Sun, 9 Aug 2009 08:53:46 +0000 (11:53 +0300)
$ help2man /usr/sbin/jffs2dump | man /dev/stdin

currently creates badly formatted output like

-b          --bigendian                 image is big endian
-l          --littleendian              image   is   little
endian  -c          --content                   dump  image
contents  -e  fname    --endianconvert=fname        convert
image endianness, output to file fname -r         --recalc-

This patch modifies the --help output for jffs2dump to be more
suitable for help2man and thus makes it possible to easily create
manual pages that stay up-to-date.

Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
jffs2dump.c

index c5a99df43d37176cba61505c9721a6b9e88cb6fe..28026823e044143212cd142de2499c7e02b92fd7 100644 (file)
@@ -52,19 +52,18 @@ char        *data;          // image data
 
 void display_help (void)
 {
-       printf("Usage: dumpjffs2 [OPTION] INPUTFILE\n"
-                       "Dumps the contents of a binary JFFS2 image.\n"
-                       "\n"
-                       "           --help                    display this help and exit\n"
-                       "           --version                 output version information and exit\n"
-                       "-b         --bigendian               image is big endian\n"
-                       "-l         --littleendian             image is little endian\n"
-                       "-c         --content                 dump image contents\n"
-                       "-e fname   --endianconvert=fname      convert image endianness, output to file fname\n"
-                       "-r         --recalccrc                recalc name and data crc on endian conversion\n"
-                       "-d len     --datsize=len              size of data chunks, when oob data in binary image (NAND only)\n"
-                       "-o len     --oobsize=len              size of oob data chunk in binary image (NAND only)\n"
-                       "-v         --verbose                 verbose output\n");
+       printf("Usage: " PROGRAM " [OPTION]... INPUTFILE\n"
+              "Dump the contents of a binary JFFS2 image.\n\n"
+              "     --help                   display this help and exit\n"
+              "     --version                display version information and exit\n"
+              " -b, --bigendian              image is big endian\n"
+              " -l, --littleendian           image is little endian\n"
+              " -c, --content                dump image contents\n"
+              " -e, --endianconvert=FNAME    convert image endianness, output to file fname\n"
+              " -r, --recalccrc              recalc name and data crc on endian conversion\n"
+              " -d, --datsize=LEN            size of data chunks, when oob data in binary image (NAND only)\n"
+              " -o, --oobsize=LEN            size of oob data chunk in binary image (NAND only)\n"
+              " -v, --verbose                verbose output\n");
        exit(0);
 }