This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
jffs2 /dev and devfs clash
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: eCos Disuss <ecos-discuss at sources dot redhat dot com>
- Date: Mon, 28 Jul 2003 09:41:38 +0200
- Subject: [ECOS] jffs2 /dev and devfs clash
Hi Folks
The jffs2 file system was broken after the last update to the latest
source from the main package. I've fixed this now, but im getting a
failure in the test case:
<INFO>: reading directory /
<INFO>: entry . [mode 016f0001 ino 02014128 nlink 1 size 0]
<INFO>: entry .. [mode 016f0001 ino 02014128 nlink 1 size 0]
<INFO>: entry etc [mode 016f0001 ino 020141d8 nlink 1 size 0]
<INFO>: entry dev<FAIL>: stat() returned -1 No such entity
<INFO>: entry mnt [mode 016f0001 ino 020141d8 nlink 1 size 0]
<INFO>: entry var [mode 016f0001 ino 020141d8 nlink 1 size 0]
<INFO>: entry tmp [mode 016f0001 ino 020141d8 nlink 1 size 0]
<INFO>: entry jffs2.img [mode 004b0008 ino 020141d8 nlink 1 size 2013]
Digging into this its a problem with the jffs2 filesystem having a
directory /dev which is clashing with the /dev for the devfs.
The test case opens the / directory with opendir and walks the list,
stat'ing each in turn. When it stat's /dev, stat does a
cyg_mtab_lookup for /dev, which is returning the devfs
filesystem.
Q1: What is the intended behaviour here? The jffs2 fs was mounted as /
so should hide the devfs mounted on /dev.
Even if it is stat'ing the wrong filesystem, i would still expect it
to work. But instead stat returns an error, no such entity. Something
is going wrong with the -5 byte offset magic in the devfs. This
results in the name passed to cyg_io_lookup being ";/dev" which
obviously fails.
Q2: Should stat of /dev work?
Andrew
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss