diff mbox

[3/6] nanddump: change -o to mean --oob, not --omitoob

Message ID 1308938594-20486-4-git-send-email-computersforpeace@gmail.com
State Accepted
Commit 1ff96d5f6b363f1796259d3a6a13c748e6cac24e
Headers show

Commit Message

Brian Norris June 24, 2011, 6:03 p.m. UTC
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>
---
 nanddump.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
diff mbox

Patch

diff --git a/nanddump.c b/nanddump.c
index 9edfbfd..adf268b 100644
--- a/nanddump.c
+++ b/nanddump.c
@@ -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");
 				}