]> www.infradead.org Git - mtd-utils.git/commitdiff
nandtest: fix --keep argument
authorRadoslav Kolev <radoslav.kolev@rnd.bg>
Thu, 25 Feb 2010 13:58:10 +0000 (15:58 +0200)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Wed, 31 Mar 2010 13:57:46 +0000 (16:57 +0300)
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@rnd.bg>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
nandtest.c

index 7613a5253a137c726ee43fb0798624eb6561b8a8..e31e28a44a5facd519aec8088b20d0f8697473d8 100644 (file)
@@ -259,7 +259,7 @@ int main(int argc, char **argv)
                                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)