mmap on jffs2(2.4.19)

leeyang
2003-04-21T06:01:58Z

I need mmap a "writable" file,
and it fails.My code is as below:

fd = open("/usr/dat/sot.dat",O_RDWR,FILEMODE);

ptr1=mmap(NULL,filesize,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0);

fd returns 3,but ptr1 returns -1 and
mmap errno says invalid agrument.
These codes runs well on ext2.

Then I checked the old maillist and source code.
It seems jffs2 currently not support mmap writable.
Am I right?

In
http://lists.infradead.org/pipermail/linux-mtd/2002-July/005436.html
dw said "some kind of mtd_remap()",
Has it been implemented now?

BTW:
My last msg was blocked by
"Message has a suspicious header"

I'm not sure the reason,I guess
the smtp server I used is broken,
and I change to another one,
hope this one works.

leeyang