issue with eraseall

Thomas Gleixner tglx at linutronix.de
Wed Apr 2 12:15:56 EST 2003


On Wednesday 02 April 2003 17:55, Earl Manning wrote:
> In my implementation I just changed the value written by eraseall to be 8.
> The offending pieces of code are:
>
> 	util/eraseall.c:84
> 	fs/jffs2/wbuf.c:671-675
I don't see a piece of offending code there

util/eraseall.c: 106 ...
		// format for JFFS2
		if (!jffs2) 
			continue;
				
		// write cleanmarker	
--->		if (isNAND) {
			struct mtd_oob_buf oob;
			oob.ptr = (unsigned char *) &cleanmarker;
			oob.start = erase.start;
--->			oob.start += meminfo.oobsize == 16 ? 8 : 6;
--->			oob.length = meminfo.oobsize == 16 ? 8 : 2;
			if (ioctl (fd, MEMWRITEOOB, &oob) != 0) {
				fprintf(stderr, "\n%s: %s: MTD writeoob failure: %s\n", exe_name, 
mtd_device, strerror(errno));
				continue;
			}
		} else {
This is for NOR !
		}


-- 
Thomas
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx at linutronix.de




More information about the linux-mtd mailing list