]> www.infradead.org Git - mtd-utils.git/commitdiff
nand-utils: nanddump: Explicitely use the page size when relevant
authorMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 26 Aug 2024 09:46:21 +0000 (11:46 +0200)
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
Tue, 8 Oct 2024 06:14:33 +0000 (08:14 +0200)
Using bs when skipping the bad sector is abusive as what we want is
using the size of a block and the size of a page. The fact that bs
currently is the size of a page is misleading here, has I intend to make
this amount grow.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
nand-utils/nanddump.c

index 346af1e1f8c0b9a8c41ce56e89f89c50688d1009..a3e6e92736f78b756fd0bfd6b24444c4d3e8c6f2 100644 (file)
@@ -458,7 +458,7 @@ int main(int argc, char * const argv[])
                        /* skip bad block, increase end_addr */
                        if (bb_method == skipbad) {
                                end_addr += mtd.eb_size;
-                               ofs += mtd.eb_size - bs;
+                               ofs += mtd.eb_size - mtd.min_io_size;
                                if (end_addr > mtd.size)
                                        end_addr = mtd.size;
                                continue;