linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nanddump: fix initialization of bad blocks oob data buffer
@ 2010-10-11  9:19 Baruch Siach
  2010-10-11 17:07 ` Mike Frysinger
  2010-10-12 10:02 ` Artem Bityutskiy
  0 siblings, 2 replies; 3+ messages in thread
From: Baruch Siach @ 2010-10-11  9:19 UTC (permalink / raw)
  To: linux-mtd; +Cc: Baruch Siach

When dumping oob data of a bad block, initialize oobbuf with 0xff, instead of
readbuf.  This avoids bogus oob data on output.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 nanddump.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/nanddump.c b/nanddump.c
index 3589931..0fdf736 100644
--- a/nanddump.c
+++ b/nanddump.c
@@ -452,7 +452,7 @@ int main(int argc, char * const argv[])
 			continue;
 
 		if (badblock) {
-			memset (readbuf, 0xff, meminfo.oobsize);
+			memset (oobbuf, 0xff, meminfo.oobsize);
 		} else {
 			/* Read OOB data and exit on failure */
 			oob.start = ofs;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-12 10:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-11  9:19 [PATCH] nanddump: fix initialization of bad blocks oob data buffer Baruch Siach
2010-10-11 17:07 ` Mike Frysinger
2010-10-12 10:02 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).