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]

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

--- Comment #6 from Nick Garnett <>  2008-04-03 14:29:00 ---
My only caveats about this are that this is not POSIX compliant. However,
making it a config option probably solves that.

A more important worry is that many filesystems do not have this information to
hand in directory entries. Most UNIX filesystem, for example, only have name
and inode number. This also applies to the eCos RAM and ROM filesystems. So to
gather this information they would effectively have to do an internal stat()
operation. While it may save effort for some filesystems, it will involve
others in more.

Whether a filesystem can provide the d_type field is a property of the
filesystem, and shouldn't be imposed from the outside. So I think that in
addition to S_IFDIR or S_IFREG, any filesystem should be allowed to set d_type
to zero, meaning "don't know". This needs to be made clear in the CDL option
description, in the definition of struct dirent and in the documentation. 

Configure issuemail:
------- You are receiving this mail because: -------
You are the QA contact for the issue.

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