public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* mmap on jffs2
@ 2004-07-21 18:23 dibacco
  2004-07-21 12:52 ` Carlos Manuel Duclos Vergara
  2004-07-21 18:37 ` David Woodhouse
  0 siblings, 2 replies; 6+ messages in thread
From: dibacco @ 2004-07-21 18:23 UTC (permalink / raw)
  To: linux-mtd

Hi,

I have a problem mapping a file opened with flag O_RDWR. This file is housed on a jffs2 file system that currently lives on simple ram. Could you give me an hint where to search for a possible solution? If I open the file in O_RDONLY mode the mapping is done, instead with O_RDWR mmap returns -EINVAL.

Thanks in advance,
Antonio.

^ permalink raw reply	[flat|nested] 6+ messages in thread
* mmap on jffs2
@ 2003-04-20 14:00 leeyang
  2003-04-22  9:33 ` Jörn Engel
  0 siblings, 1 reply; 6+ messages in thread
From: leeyang @ 2003-04-20 14:00 UTC (permalink / raw)
  To: linux-mtd

I am using jffs2 on a ppc860 system(amd29lv160).
Things seems ok,but when I am trying mmap.

I want to mmap a file in flash,so i can treat
the file like some records.

I mean operation like
 fd = open("/usr/dat/sot.dat",O_RDWR,FILEMODE);
 
 ptr1=mmap(NULL,filesize,PROT_READ|PROT_WRITE,
   MAP_SHARED,fd,0);

fd returns 3 and it is ok,however ptr1 returns -1.
I checked the errno it said invalid argument.

I have to say arguments "filesize" above is not
aligment to any requirements,just the real file
size?Does it matter?

The same procedure can done on common ext2
so i wonder jffs2 implement all the features like
ext2?

leeyang

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-07-21 18:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-21 18:23 mmap on jffs2 dibacco
2004-07-21 12:52 ` Carlos Manuel Duclos Vergara
2004-07-21 18:37 ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2003-04-20 14:00 leeyang
2003-04-22  9:33 ` Jörn Engel
2003-04-23  7:30   ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox