diff options
author | Brian Norris <computersforpeace@gmail.com> | 2011-06-24 11:03:09 -0700 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-06-25 10:01:29 +0300 |
commit | d8b8f780ec3c916f3990e9227d6bfbb22bf42ef8 (patch) | |
tree | 3fcdf43d09532abf5d8a785b75bfc9c77766bc0a /nanddump.c | |
parent | 5319b84974fcb71504aed2d1b8285e9c0a4a4bb8 (diff) |
nanddump: kill --omitbad, --noskipbad
As mentioned previously, we are killing --omitbad in favor of the new
--bb=skipbad option, which functions fairly similarly. Also, --noskipbad
has become --bb=dumpbad, so remove the old `-N' and `--noskipbad' flags.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'nanddump.c')
-rw-r--r-- | nanddump.c | 46 |
1 files changed, 1 insertions, 45 deletions
@@ -64,21 +64,6 @@ static void display_help(void) " dumpbad: dump flash data, including any bad blocks\n" " skipbad: dump good data, completely skipping any bad blocks\n" "\n" -"Deprecated options:\n" -"The following options are being replaced by --bb=METHOD flags or being\n" -"removed entirely. Do not continue to use these options.\n" -"-b --omitbad Omit bad blocks from the dump (DEPRECATED)\n" -"-N --noskipbad Read without bad block skipping\n" -"\n" -"Notes on --omitbad and --bb=skipbad:\n" -"* `omitbad' and `skipbad' are very similar; we are deprecating `--omitbad'\n" -" in favor of `--bb=skipbad'.\n" -"* With either option, we stop dumping data when we encounter a bad block\n" -" and resume dumping at the next good block. However, with `omitbad', we\n" -" count the bad block as part of the total dump length, whereas with\n" -" `skipbad', the bad block is skipped, that is, not counted toward the\n" -" total dump length.\n" -"\n" "Note on --oob, --omitoob:\n" " To make nanddump act more like an inverse to nandwrite, we are changing\n" " the default OOB behavior. In the next release, nanddump will not dump\n" @@ -120,7 +105,6 @@ static enum { padbad, // dump flash data, substituting 0xFF for any bad blocks dumpbad, // dump flash data, including any bad blocks skipbad, // dump good data, completely skipping any bad blocks - omitbad // dump flash data, substituting nothing for any bad blocks (DEPRECATED) } bb_method = padbad; static void process_options(int argc, char * const argv[]) @@ -130,7 +114,7 @@ static void process_options(int argc, char * const argv[]) for (;;) { int option_index = 0; - static const char *short_options = "bs:f:l:opqnNca"; + static const char *short_options = "s:f:l:opqnca"; static const struct option long_options[] = { {"help", no_argument, 0, 0}, {"version", no_argument, 0, 0}, @@ -141,11 +125,9 @@ static void process_options(int argc, char * const argv[]) {"file", required_argument, 0, 'f'}, {"prettyprint", no_argument, 0, 'p'}, {"omitoob", no_argument, 0, 'o'}, - {"omitbad", no_argument, 0, 'b'}, //DEPRECATED {"startaddress", required_argument, 0, 's'}, {"length", required_argument, 0, 'l'}, {"noecc", no_argument, 0, 'n'}, - {"noskipbad", no_argument, 0, 'N'}, {"quiet", no_argument, 0, 'q'}, {0, 0, 0, 0}, }; @@ -187,18 +169,6 @@ static void process_options(int argc, char * const argv[]) break; } break; - case 'b': - /* Check if bb_method was already set explicitly */ - if (bb_default) { - bb_default = false; - bb_method = omitbad; - warnmsg("--omitbad is being deprecated in favor of --bb=skipbad.\n" - " --omitbad will not be available in future releases.\n" - " Please update your usage accordingly."); - } else { - error++; - } - break; case 's': start_addr = simple_strtoll(optarg, &error); break; @@ -233,18 +203,6 @@ static void process_options(int argc, char * const argv[]) case 'n': noecc = true; break; - case 'N': - /* Check if bb_method was already set explicitly */ - if (bb_default) { - bb_default = false; - bb_method = dumpbad; - warnmsg("--noskipbad is being deprecated in favor of --bb=dumpbad.\n" - " --noskipbad will not be available in future releases.\n" - " Please update your usage accordingly."); - } else { - error++; - } - break; case '?': error++; break; @@ -499,8 +457,6 @@ int main(int argc, char * const argv[]) end_addr = mtd.size; continue; } - if (bb_method == omitbad) - continue; memset(readbuf, 0xff, bs); } else { /* Read page data and exit on failure */ |