summaryrefslogtreecommitdiff
path: root/nand-utils/nandflipbits.c
diff options
context:
space:
mode:
Diffstat (limited to 'nand-utils/nandflipbits.c')
-rw-r--r--nand-utils/nandflipbits.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nand-utils/nandflipbits.c b/nand-utils/nandflipbits.c
index aa6850f..cd66d0b 100644
--- a/nand-utils/nandflipbits.c
+++ b/nand-utils/nandflipbits.c
@@ -249,7 +249,9 @@ int main(int argc, char **argv)
bufoffs += mtd.min_io_size;
- ret = mtd_read_oob(mtd_desc, &mtd, fd, blkoffs,
+ ret = mtd_read_oob(mtd_desc, &mtd, fd,
+ bit_to_flip->block * mtd.eb_size +
+ blkoffs,
mtd.oob_size, buffer + bufoffs);
if (ret) {
fprintf(stderr, "MTD OOB read failure\n");