summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gardiner <bengardiner@nanometrics.ca>2011-08-09 16:57:28 -0400
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-08-25 14:00:11 +0300
commit73c6c15a4f10f9fd437d28a7de9dc90a6ed97826 (patch)
tree8319b4856364a0da02d0352da6c330c74320557b
parentd2c8ef937d0ae04ee7c81a7243e265f606ef9ce8 (diff)
nandtest: print number of bits corrected during test
The nandtest program monitors the corrected ecc stat to determine if an ECC correction has taken place during the last write-read. If so, it prints "ECC corrected". The mtd subsytem will store the number of bits corrected in the corrected ecc stat so update the nandtest output to print also the number of bits corrected when performing the test. Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
-rw-r--r--nandtest.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nandtest.c b/nandtest.c
index d03dc11..dc28d09 100644
--- a/nandtest.c
+++ b/nandtest.c
@@ -98,7 +98,9 @@ int erase_and_write(loff_t ofs, unsigned char *data, unsigned char *rbuf)
}
if (newstats.corrected > oldstats.corrected) {
- printf("\nECC corrected at %08x\n", (unsigned) ofs);
+ printf("\n %d bit(s) ECC corrected at %08x\n",
+ newstats.corrected - oldstats.corrected,
+ (unsigned) ofs);
oldstats.corrected = newstats.corrected;
}
if (newstats.failed > oldstats.failed) {