diff options
author | Doug Zongker <dougz@android.com> | 2010-11-04 15:20:28 +0100 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-11-04 15:20:28 +0100 |
commit | 70f7e8dbf0c56f55bdeb2fe563c4f49da165d16d (patch) | |
tree | 05cc9f083ba595dec2756c302f8faac27c952458 | |
parent | am 8521ef59: am 51266d13: clear recovery framebuffers on allocation; display icon right after ui_init (diff) | |
parent | am 5d6309e7: fix comparison of ECC stats before and after mtd reads (diff) | |
download | android_bootable_recovery-70f7e8dbf0c56f55bdeb2fe563c4f49da165d16d.tar android_bootable_recovery-70f7e8dbf0c56f55bdeb2fe563c4f49da165d16d.tar.gz android_bootable_recovery-70f7e8dbf0c56f55bdeb2fe563c4f49da165d16d.tar.bz2 android_bootable_recovery-70f7e8dbf0c56f55bdeb2fe563c4f49da165d16d.tar.lz android_bootable_recovery-70f7e8dbf0c56f55bdeb2fe563c4f49da165d16d.tar.xz android_bootable_recovery-70f7e8dbf0c56f55bdeb2fe563c4f49da165d16d.tar.zst android_bootable_recovery-70f7e8dbf0c56f55bdeb2fe563c4f49da165d16d.zip |
-rw-r--r-- | mtdutils/mtdutils.c | 2 |
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", |