]> www.infradead.org Git - mtd-utils.git/commitdiff
nanddump: add --oob option
authorBrian Norris <computersforpeace@gmail.com>
Wed, 22 Jun 2011 16:49:22 +0000 (09:49 -0700)
committerArtem Bityutskiy <dedekind1@gmail.com>
Thu, 23 Jun 2011 14:57:55 +0000 (17:57 +0300)
Adds an explicit option for including OOB data in our data dump.
Currently, this is the default behavior, but in the next release, the
default will be to exclude OOB data. This is done to mirror the '-o'
option in nandwrite.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
nanddump.c

index b6307cf51144420b65a41e39e97cc4ac31b9c0a9..e19a45fd3b25c5cbc4e5d953831d627cca580231 100644 (file)
@@ -54,6 +54,7 @@ static void display_help(void)
 "-l length  --length=length      Length\n"
 "-n         --noecc              Read without error correction\n"
 "-o         --omitoob            Omit oob data\n"
+"           --oob                Dump OOB data\n"
 "-p         --prettyprint        Print nice (hexdump)\n"
 "-q         --quiet              Don't display progress and status messages\n"
 "-s addr    --startaddress=addr  Start address\n"
@@ -127,6 +128,7 @@ static void process_options(int argc, char * const argv[])
                        {"help", no_argument, 0, 0},
                        {"version", no_argument, 0, 0},
                        {"bb", required_argument, 0, 0},
+                       {"oob", no_argument, 0, 0},
                        {"forcebinary", no_argument, 0, 'a'},
                        {"canonicalprint", no_argument, 0, 'c'},
                        {"file", required_argument, 0, 'f'},
@@ -168,6 +170,9 @@ static void process_options(int argc, char * const argv[])
                                                        error++;
                                                bb_default = false;
                                                break;
+                                       case 3: /* --oob */
+                                               omitoob = false;
+                                               break;
                                }
                                break;
                        case 'b':