mtd/util docfdisk.c,1.6,1.7

dbrown at infradead.org dbrown at infradead.org
Wed Jul 28 10:13:34 EDT 2004


Update of /home/cvs/mtd/util
In directory phoenix.infradead.org:/tmp/cvs-serv29769

Modified Files:
	docfdisk.c 
Log Message:
Make sure we clear the ECC fields in OOB before writing.


Index: docfdisk.c
===================================================================
RCS file: /home/cvs/mtd/util/docfdisk.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- docfdisk.c	28 Jul 2004 13:57:28 -0000	1.6
+++ docfdisk.c	28 Jul 2004 14:13:31 -0000	1.7
@@ -309,6 +309,7 @@
 	oob.ptr = oobbuf;
 	oob.start = mhoffs;
 	for (i = 0; i < meminfo.erasesize; i += meminfo.oobblock) {
+		memset(oob.ptr, 0xff, 6); // clear ECC.
 		if (ioctl(fd, MEMWRITEOOB, &oob)) {
 			perror("ioctl(MEMWRITEOOB)");
 			printf("Your MediaHeader may be hosed.  UHOH!\n");





More information about the linux-mtd-cvs mailing list