public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "leeyang" <leeyang@ycig.com>
To: <linux-mtd@lists.infradead.org>
Subject: mmap on jffs2
Date: Sun, 20 Apr 2003 22:00:51 +0800	[thread overview]
Message-ID: <001301c30745$438c1e60$0365a8c0@leeyang> (raw)

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

             reply	other threads:[~2003-04-20 14:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-20 14:00 leeyang [this message]
2003-04-22  9:33 ` mmap on jffs2 Jörn Engel
2003-04-23  7:30   ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2004-07-21 18:23 dibacco
2004-07-21 12:52 ` Carlos Manuel Duclos Vergara
2004-07-21 18:37 ` David Woodhouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001301c30745$438c1e60$0365a8c0@leeyang' \
    --to=leeyang@ycig.com \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox