]> www.infradead.org Git - mtd-utils.git/commitdiff
nanddump: change -o to mean --oob, not --omitoob
authorBrian Norris <computersforpeace@gmail.com>
Fri, 24 Jun 2011 18:03:11 +0000 (11:03 -0700)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Sat, 25 Jun 2011 07:01:50 +0000 (10:01 +0300)
As warned earlier, we are changing the meaning of `nanddump -o' to
mirror the usage in nandwrite, where -o means to include OOB (i.e.,
`nandwrite -o' writes data to both in-band and out-of-band areas, so
`nanddump -o' should dump data from both in-band and out-of-band areas).

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

index 9edfbfd39b278dfcc8f1645cba7f4d6d53509d03..adf268bf8d55d54ed4191af3b664437c116f82c5 100644 (file)
@@ -53,8 +53,8 @@ static void display_help(void)
 "-f file    --file=file          Dump to file\n"
 "-l length  --length=length      Length\n"
 "-n         --noecc              Read without error correction\n"
-"-o         --omitoob            Omit OOB data (default in next release)\n"
-"           --oob                Dump OOB data (current default)\n"
+"           --omitoob            Omit OOB data (default in next release)\n"
+"-o         --oob                Dump OOB data (current default)\n"
 "-p         --prettyprint        Print nice (hexdump)\n"
 "-q         --quiet              Don't display progress and status messages\n"
 "-s addr    --startaddress=addr  Start address\n"
@@ -119,12 +119,12 @@ 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},
+                       {"omitoob", no_argument, 0, 0},
                        {"forcebinary", no_argument, 0, 'a'},
                        {"canonicalprint", no_argument, 0, 'c'},
                        {"file", required_argument, 0, 'f'},
+                       {"oob", no_argument, 0, 'o'},
                        {"prettyprint", no_argument, 0, 'p'},
-                       {"omitoob", no_argument, 0, 'o'},
                        {"startaddress", required_argument, 0, 's'},
                        {"length", required_argument, 0, 'l'},
                        {"noecc", no_argument, 0, 'n'},
@@ -159,10 +159,10 @@ static void process_options(int argc, char * const argv[])
                                                        error++;
                                                bb_default = false;
                                                break;
-                                       case 3: /* --oob */
+                                       case 3: /* --omitoob */
                                                if (oob_default) {
                                                        oob_default = false;
-                                                       omitoob = false;
+                                                       omitoob = true;
                                                } else {
                                                        errmsg_die("--oob and --oomitoob are mutually exclusive");
                                                }
@@ -184,7 +184,7 @@ static void process_options(int argc, char * const argv[])
                        case 'o':
                                if (oob_default) {
                                        oob_default = false;
-                                       omitoob = true;
+                                       omitoob = false;
                                } else {
                                        errmsg_die("--oob and --oomitoob are mutually exclusive");
                                }