This is the mail archive of the
mailing list for the eCos project.
[Issue 1000538] add a d_type field to struct dirent in fileio
- From: bugzilla-daemon at ecoscentric dot com
- To: ecos-patches at ecos dot sourceware dot org
- Date: Thu, 3 Apr 2008 14:29:00 +0100
- Subject: [Issue 1000538] add a d_type field to struct dirent in fileio
--- Comment #6 from Nick Garnett <email@example.com> 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: http://bugzilla.ecoscentric.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the issue.