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;
 
        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));
                        }



                        

                        

Attachment: nandwrite.diff
Description: Binary data

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to