[PATCH] [MTD] nandtest.c: fix --keep argument

Radoslav Kolev radoslav.kolev at rnd.bg
Thu Feb 25 08:58:10 EST 2010


[PATCH] [MTD] nandtest.c: fix --keep argument

When called with the --keep argument nandtest is supposed to restore the
original content after testing, but currently it doesn't. The patch
below fixes the problem.

Signed-off-by: Radoslav Kolev <radoslav.kolev at rnd.bg>

--- mtd-utils/nandtest.c	2010-02-25 11:44:59.000000000 +0200
+++ mtd-utils-patched/nandtest.c	2010-02-25 15:48:48.000000000 +0200
@@ -259,7 +259,7 @@
 				printf("\r%08x: reading... ", (unsigned)test_ofs);
 				fflush(stdout);
 
-				len = pread(fd, rbuf, meminfo.erasesize, test_ofs);
+				len = pread(fd, kbuf, meminfo.erasesize, test_ofs);
 				if (len < meminfo.erasesize) {
 					printf("\n");
 					if (len)





More information about the linux-mtd mailing list