From: Radoslav Kolev Date: Thu, 25 Feb 2010 13:58:10 +0000 (+0200) Subject: nandtest: fix --keep argument X-Git-Tag: v1.4.0~48^2~1^2~7 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=94fc0263667926cfad7647c1054b4473cc92ecee;p=mtd-utils.git nandtest: 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 Signed-off-by: Artem Bityutskiy --- diff --git a/nandtest.c b/nandtest.c index 7613a52..e31e28a 100644 --- a/nandtest.c +++ b/nandtest.c @@ -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)