Received: from an-out-0708.google.com ([209.85.132.243]) by bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux)) id 1JXgvh-0004ln-Sv for linux-mtd@lists.infradead.org; Fri, 07 Mar 2008 18:04:26 +0000 Received: by an-out-0708.google.com with SMTP id c3so139951ana.99 for ; Fri, 07 Mar 2008 10:04:23 -0800 (PST) Message-Id: From: chris mcharg To: linux-mtd@lists.infradead.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: [PATCH][MTD-UTILS] nanddump: fix badblock oob output Date: Sat, 8 Mar 2008 03:04:20 +0900 List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi, Was looking over the nanddump code and it appears that the incorrect buffer is being 0xffed when outputting badblock oob data. I haven't actually run nanddump yet and so haven't tested, but it seems simple enough so I've included the patch below. Cheers, Chris ---- --- a/nanddump.c +++ b/nanddump.c @@ -335,7 +335,7 @@ int main(int argc, char **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;