aboutsummaryrefslogtreecommitdiff
path: root/miscutils/nandwrite.c
diff options
context:
space:
mode:
authorBaruch Siach <baruch@tkos.co.il>2012-10-15 14:32:23 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2012-10-15 14:32:23 +0200
commit3aeb870b2284713a5f206bc40910b86da7d26966 (patch)
tree55fd994053a1f4524efe0fa48e570f426c805a0f /miscutils/nandwrite.c
parent98f6b2d399e5fc02989390a04bd6c955b309cf7d (diff)
downloadbusybox-3aeb870b2284713a5f206bc40910b86da7d26966.tar.gz
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>
Diffstat (limited to 'miscutils/nandwrite.c')
-rw-r--r--miscutils/nandwrite.c8
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 @@
//usage: "[-o] [-b] [-s ADDR] [-f FILE] MTD_DEVICE"
//usage:#define nanddump_full_usage "\n\n"
//usage: "Dump the specified MTD device\n"
-//usage: "\n -o Omit oob data"
+//usage: "\n -o Dump oob data"
//usage: "\n -b Omit bad block from the dump"
//usage: "\n -s ADDR Start address"
//usage: "\n -l LEN Length"
@@ -164,7 +164,7 @@ int nandwrite_main(int argc UNUSED_PARAM, char **argv)
/* bad block(s), advance mtdoffset */
if (IS_NANDDUMP && !(opts & OPT_b)) {
int bad_len = MIN(tmp, end_addr) - mtdoffset;
- dump_bad(&meminfo, bad_len, !(opts & OPT_o));
+ dump_bad(&meminfo, bad_len, opts & OPT_o);
}
mtdoffset = tmp;
}
@@ -184,7 +184,7 @@ int nandwrite_main(int argc UNUSED_PARAM, char **argv)
printf("Writing at 0x%08x\n", mtdoffset);
else if (mtdoffset > blockstart && !(opts & OPT_b)) {
int bad_len = MIN(mtdoffset, limit) - blockstart;
- dump_bad(&meminfo, bad_len, !(opts & OPT_o));
+ dump_bad(&meminfo, bad_len, opts & OPT_o);
}
if (mtdoffset >= limit)
break;
@@ -210,7 +210,7 @@ int nandwrite_main(int argc UNUSED_PARAM, char **argv)
}
xwrite(output_fd, filebuf, meminfo_writesize);
- if (IS_NANDDUMP && !(opts & OPT_o)) {
+ if (IS_NANDDUMP && (opts & OPT_o)) {
/* Dump OOB data */
oob.start = mtdoffset;
xioctl(fd, MEMREADOOB, &oob);