Hi MicroMax, On Thu, Jan 19, 2012 at 03:31:59PM +0400, MicroMax wrote: > Error in function dump_bad: Rounding includes bug. Rounding is not need. > Error option "-b": Add check.
> > Best Regards > MicroMax > > > --- nandwrite.c 2011-09-06 06:35:36.000000000 +0400 > +++ nandwrite_new.c 2012-01-19 14:57:00.453125000 +0400 > @@ -65,7 +65,7 @@ > unsigned count; > > /* round len to the next page */ > - len = (len | ~(meminfo->writesize - 1)) + 1; > + //len = (len | ~(meminfo->writesize - 1)) + 1; Just remove these lines. Other than that for both changes: Acked-by: Baruch Siach <[email protected]> > > memset(buf, 0xff, sizeof(buf)); > for (count = 0; count < len; count += meminfo->writesize) { > @@ -182,7 +182,7 @@ > 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)); > } baruch -- ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - [email protected] - tel: +972.2.679.5364, http://www.tkos.co.il - _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
