mtd/util docfdisk.c,1.2,1.3

dbrown at infradead.org dbrown at infradead.org
Wed Jul 28 08:48:02 EDT 2004


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

Modified Files:
	docfdisk.c 
Log Message:
ACTUALLY keep going on ECC error.


Index: docfdisk.c
===================================================================
RCS file: /home/cvs/mtd/util/docfdisk.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- docfdisk.c	28 Jul 2004 12:37:49 -0000	1.2
+++ docfdisk.c	28 Jul 2004 12:48:00 -0000	1.3
@@ -219,9 +219,12 @@
 
 	for (mhblock = 0; mhblock < MAXSCAN; mhblock++) {
 		if ((ret = pread(fd, buf, meminfo.erasesize, mhblock * meminfo.erasesize)) < 0) {
+			if (ret == -EBADMSG) {
+				printf("ECC error at eraseblock %d\n", mhblock);
+				continue;
+			}
 			perror("Read eraseblock");
-			if (ret != -EBADMSG)
-				return 1;
+			return 1;
 		}
 		if (ret != meminfo.erasesize) {
 			printf("Short read!\n");





More information about the linux-mtd-cvs mailing list