summaryrefslogtreecommitdiffstats
path: root/mtdutils
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2010-11-03 22:31:01 +0100
committerDoug Zongker <dougz@android.com>2010-11-03 22:31:01 +0100
commit5d6309e77f6055a9aec062dd991d071054726ebb (patch)
treeb77fcc831eb1c8c17399d2a1e6e7dae9ff22b5ff /mtdutils
parentclear recovery framebuffers on allocation; display icon right after ui_init (diff)
downloadandroid_bootable_recovery-5d6309e77f6055a9aec062dd991d071054726ebb.tar
android_bootable_recovery-5d6309e77f6055a9aec062dd991d071054726ebb.tar.gz
android_bootable_recovery-5d6309e77f6055a9aec062dd991d071054726ebb.tar.bz2
android_bootable_recovery-5d6309e77f6055a9aec062dd991d071054726ebb.tar.lz
android_bootable_recovery-5d6309e77f6055a9aec062dd991d071054726ebb.tar.xz
android_bootable_recovery-5d6309e77f6055a9aec062dd991d071054726ebb.tar.zst
android_bootable_recovery-5d6309e77f6055a9aec062dd991d071054726ebb.zip
Diffstat (limited to 'mtdutils')
-rw-r--r--mtdutils/mtdutils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mtdutils/mtdutils.c b/mtdutils/mtdutils.c
index 48d5ea9ab..198f4989d 100644
--- a/mtdutils/mtdutils.c
+++ b/mtdutils/mtdutils.c
@@ -309,6 +309,8 @@ static int read_block(const MtdPartition *partition, int fd, char *data)
fprintf(stderr, "mtd: ECC errors (%d soft, %d hard) at 0x%08llx\n",
after.corrected - before.corrected,
after.failed - before.failed, pos);
+ // copy the comparison baseline for the next read.
+ memcpy(&before, &after, sizeof(struct mtd_ecc_stats));
} else if ((mgbb = ioctl(fd, MEMGETBADBLOCK, &pos))) {
fprintf(stderr,
"mtd: MEMGETBADBLOCK returned %d at 0x%08llx (errno=%d)\n",