From: Baruch Siach Date: Mon, 15 Oct 2012 12:25:26 +0000 (+0200) Subject: nanddump: skip bad blocks when instructed to do so X-Git-Tag: 1_21_0~53 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=98f6b2d399e5fc02989390a04bd6c955b309cf7d;p=oweals%2Fbusybox.git nanddump: skip bad blocks when instructed to do so Signed-off-by: Baruch Siach Signed-off-by: Denys Vlasenko --- diff --git a/miscutils/nandwrite.c b/miscutils/nandwrite.c index a93433457..554d36249 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)); }