* issue with eraseall
@ 2003-04-02 15:55 Earl Manning
2003-04-02 17:15 ` Thomas Gleixner
0 siblings, 1 reply; 2+ messages in thread
From: Earl Manning @ 2003-04-02 15:55 UTC (permalink / raw)
To: linux-mtd
I am using the MTD stuff with a Samsung NAND chip and all is going well, except that I had to change a line in the eraseall program. As it turns out the clean marker written by the eraseall program puts sizeof( struct jffs2_unknown_node ) [12 bytes] into the totlen element. When jffs2 tries to mount the now blank partition, the cleanmarker check fails because the value is not 8.
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
Is there a better place to post this information?
Thanks,
Earl Manning
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: issue with eraseall
2003-04-02 15:55 issue with eraseall Earl Manning
@ 2003-04-02 17:15 ` Thomas Gleixner
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Gleixner @ 2003-04-02 17:15 UTC (permalink / raw)
To: Earl Manning, linux-mtd
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@linutronix.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-04-02 16:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-02 15:55 issue with eraseall Earl Manning
2003-04-02 17:15 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox