[PATCH 2/3] nanddump: skip bad blocks when instructed to do so
Baruch Siach
baruch at tkos.co.il
Thu Sep 13 11:07:09 UTC 2012
Signed-off-by: Baruch Siach <baruch at tkos.co.il>
---
miscutils/nandwrite.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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));
}
--
1.7.10.4
More information about the busybox
mailing list