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

login
register
mail settings
Submitter Radoslav Kolev
Date Feb. 25, 2010, 1:58 p.m.
Message ID <1267106290.8549.91.camel@rado-desktop>
Download mbox | patch
Permalink /patch/46239/
State Accepted
Commit 94fc0263667926cfad7647c1054b4473cc92ecee
Headers show

Comments

Radoslav Kolev - Feb. 25, 2010, 1:58 p.m.
[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@rnd.bg>
Artem Bityutskiy - March 31, 2010, 1:58 p.m.
On Thu, 2010-02-25 at 15:58 +0200, Radoslav Kolev wrote:
> [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@rnd.bg>

Pushed to mtd-utils.git, thank you!

Patch

--- 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)