This is the mail archive of the mailing list for the eCos project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug 1000538] add a d_type field to struct dirent in fileio

Andrew Lunn <> changed:

           What    |Removed                     |Added
 Attachment #532 is|0                           |1
           obsolete|                            |
 Attachment #543 is|0                           |1
           obsolete|                            |

--- Comment #12 from Andrew Lunn <>  2008-04-21 20:48:36 ---
Created an attachment (id=546)
 --> (
Next version of the patch. Might work now?

Testing the last patch i found a couple of problems. The ROMFS test was broken,
missing an include file. Was it tested? 

Once the test case ran, it showed up another problem with mount points. At
least i think it is a problem. The dirent returned by readdir() on a directory
which is a mount point returns the mode of the directory underneath the mount
point. stat() returns the mode of the mounted root directory. Hence you get
inconsistent return values. Both return directory types, but the permission
bits are different.

The Linux man pages for readdir() documents that d_type only returns a few bits
of useful information, basically the type of file. So i restricted the return
value in eCos to also return the file type and nothing more. This results in
consistent  values for readdir() and stat().  

Comments please.

Configure bugmail:
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]