summaryrefslogtreecommitdiffstats
path: root/tools/mtd-utils/patches/000-upstream_nanddump.patch
diff options
context:
space:
mode:
authorAlexandros C. Couloumbis <alex@ozo.com>2010-10-15 07:52:37 +0000
committerAlexandros C. Couloumbis <alex@ozo.com>2010-10-15 07:52:37 +0000
commit585850eafb44e889fe4281872ff5a96e82394e5f (patch)
tree168fb6493b55dfe4c0afd64b3a0dd502a4136fbd /tools/mtd-utils/patches/000-upstream_nanddump.patch
parenta680385396f42aa756d209ce1cea3d350624d95e (diff)
downloadmaster-31e0f0ae-585850eafb44e889fe4281872ff5a96e82394e5f.tar.gz
master-31e0f0ae-585850eafb44e889fe4281872ff5a96e82394e5f.tar.bz2
master-31e0f0ae-585850eafb44e889fe4281872ff5a96e82394e5f.zip
tools/mtd-utils: add two upstream patches
SVN-Revision: 23453
Diffstat (limited to 'tools/mtd-utils/patches/000-upstream_nanddump.patch')
-rw-r--r--tools/mtd-utils/patches/000-upstream_nanddump.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/mtd-utils/patches/000-upstream_nanddump.patch b/tools/mtd-utils/patches/000-upstream_nanddump.patch
new file mode 100644
index 0000000000..e04f6d5e0d
--- /dev/null
+++ b/tools/mtd-utils/patches/000-upstream_nanddump.patch
@@ -0,0 +1,28 @@
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Mon, 11 Oct 2010 09:19:38 +0000 (+0200)
+Subject: nanddump: fix initialization of bad blocks oob data buffer
+X-Git-Url: http://git.infradead.org
+
+nanddump: fix initialization of bad blocks oob data buffer
+
+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>
+Acked-by: Mike Frysinger <vapier@gentoo.org>
+Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
+---
+
+diff --git a/nanddump.c b/nanddump.c
+index 3589931..b7341a5 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;