summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaruch Siach <baruch@tkos.co.il>2012-10-15 12:25:26 (GMT)
committer Denys Vlasenko <vda.linux@googlemail.com>2012-10-15 12:25:26 (GMT)
commit98f6b2d399e5fc02989390a04bd6c955b309cf7d (patch)
tree8ca8fb61257e102a30644915f6cabb6076c1acd5
parentda0200a1e50b3b4335757086a7426495eaacb31b (diff)
downloadbusybox-98f6b2d399e5fc02989390a04bd6c955b309cf7d.tar.gz
busybox-98f6b2d399e5fc02989390a04bd6c955b309cf7d.tar.bz2
nanddump: skip bad blocks when instructed to do so
Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--miscutils/nandwrite.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/miscutils/nandwrite.c b/miscutils/nandwrite.c
index a934334..554d362 100644
--- a/miscutils/nandwrite.c
+++ b/miscutils/nandwrite.c
@@ -182,7 +182,7 @@ int nandwrite_main(int argc UNUSED_PARAM, char **argv)
mtdoffset = next_good_eraseblock(fd, &meminfo, blockstart);
if (IS_NANDWRITE)
printf("Writing at 0x%08x\n", mtdoffset);
- else if (mtdoffset > blockstart) {
+ else if (mtdoffset > blockstart && !(opts & OPT_b)) {
int bad_len = MIN(mtdoffset, limit) - blockstart;
dump_bad(&meminfo, bad_len, !(opts & OPT_o));
}