am c5ebf1fb: am 5d6309e7: fix comparison of ECC stats before and after mtd reads

* commit 'c5ebf1fba2f870a4e9453721112900975c18e083':
  fix comparison of ECC stats before and after mtd reads
This commit is contained in:
Doug Zongker 2010-11-04 07:20:28 -07:00 committed by Android Git Automerger
commit 70f7e8dbf0

View File

@ -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",