diff options
author | Baruch Siach <baruch@tkos.co.il> | 2012-10-15 14:32:23 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-10-15 14:32:23 +0200 |
commit | 3aeb870b2284713a5f206bc40910b86da7d26966 (patch) | |
tree | 55fd994053a1f4524efe0fa48e570f426c805a0f | |
parent | 98f6b2d399e5fc02989390a04bd6c955b309cf7d (diff) | |
download | busybox-w32-3aeb870b2284713a5f206bc40910b86da7d26966.tar.gz busybox-w32-3aeb870b2284713a5f206bc40910b86da7d26966.tar.bz2 busybox-w32-3aeb870b2284713a5f206bc40910b86da7d26966.zip |
nanddump: invert the meaning of the -o parameter to match upstream
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | miscutils/nandwrite.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/miscutils/nandwrite.c b/miscutils/nandwrite.c index 554d36249..5908ac773 100644 --- a/miscutils/nandwrite.c +++ b/miscutils/nandwrite.c | |||
@@ -39,7 +39,7 @@ | |||
39 | //usage: "[-o] [-b] [-s ADDR] [-f FILE] MTD_DEVICE" | 39 | //usage: "[-o] [-b] [-s ADDR] [-f FILE] MTD_DEVICE" |
40 | //usage:#define nanddump_full_usage "\n\n" | 40 | //usage:#define nanddump_full_usage "\n\n" |
41 | //usage: "Dump the specified MTD device\n" | 41 | //usage: "Dump the specified MTD device\n" |
42 | //usage: "\n -o Omit oob data" | 42 | //usage: "\n -o Dump oob data" |
43 | //usage: "\n -b Omit bad block from the dump" | 43 | //usage: "\n -b Omit bad block from the dump" |
44 | //usage: "\n -s ADDR Start address" | 44 | //usage: "\n -s ADDR Start address" |
45 | //usage: "\n -l LEN Length" | 45 | //usage: "\n -l LEN Length" |
@@ -164,7 +164,7 @@ int nandwrite_main(int argc UNUSED_PARAM, char **argv) | |||
164 | /* bad block(s), advance mtdoffset */ | 164 | /* bad block(s), advance mtdoffset */ |
165 | if (IS_NANDDUMP && !(opts & OPT_b)) { | 165 | if (IS_NANDDUMP && !(opts & OPT_b)) { |
166 | int bad_len = MIN(tmp, end_addr) - mtdoffset; | 166 | int bad_len = MIN(tmp, end_addr) - mtdoffset; |
167 | dump_bad(&meminfo, bad_len, !(opts & OPT_o)); | 167 | dump_bad(&meminfo, bad_len, opts & OPT_o); |
168 | } | 168 | } |
169 | mtdoffset = tmp; | 169 | mtdoffset = tmp; |
170 | } | 170 | } |
@@ -184,7 +184,7 @@ int nandwrite_main(int argc UNUSED_PARAM, char **argv) | |||
184 | printf("Writing at 0x%08x\n", mtdoffset); | 184 | printf("Writing at 0x%08x\n", mtdoffset); |
185 | else if (mtdoffset > blockstart && !(opts & OPT_b)) { | 185 | else if (mtdoffset > blockstart && !(opts & OPT_b)) { |
186 | int bad_len = MIN(mtdoffset, limit) - blockstart; | 186 | int bad_len = MIN(mtdoffset, limit) - blockstart; |
187 | dump_bad(&meminfo, bad_len, !(opts & OPT_o)); | 187 | dump_bad(&meminfo, bad_len, opts & OPT_o); |
188 | } | 188 | } |
189 | if (mtdoffset >= limit) | 189 | if (mtdoffset >= limit) |
190 | break; | 190 | break; |
@@ -210,7 +210,7 @@ int nandwrite_main(int argc UNUSED_PARAM, char **argv) | |||
210 | } | 210 | } |
211 | xwrite(output_fd, filebuf, meminfo_writesize); | 211 | xwrite(output_fd, filebuf, meminfo_writesize); |
212 | 212 | ||
213 | if (IS_NANDDUMP && !(opts & OPT_o)) { | 213 | if (IS_NANDDUMP && (opts & OPT_o)) { |
214 | /* Dump OOB data */ | 214 | /* Dump OOB data */ |
215 | oob.start = mtdoffset; | 215 | oob.start = mtdoffset; |
216 | xioctl(fd, MEMREADOOB, &oob); | 216 | xioctl(fd, MEMREADOOB, &oob); |