Message ID | f46b9092828dde57ea4bb4ce661c4f15ff2e0888.1312922073.git.bengardiner@nanometrics.ca |
---|---|
State | Accepted |
Commit | 73c6c15a4f10f9fd437d28a7de9dc90a6ed97826 |
Headers | show |
On Tue, 2011-08-09 at 16:57 -0400, Ben Gardiner wrote: > 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> Pushed this patch to mtd-utils, thanks!
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) {
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> --- nandtest.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)