This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
[Bug 1000538] New: 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: Wed, 2 Apr 2008 12:24:12 +0100
- Subject: [Bug 1000538] New: add a d_type field to struct dirent in fileio
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1000538
Summary: add a d_type field to struct dirent in fileio
Product: eCos
Version: CVS
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: normal
Priority: normal
Component: Patches and contributions
AssignedTo: jifl@ecoscentric.com
ReportedBy: eCos@sunnorth.com.cn
QAContact: ecos-patches@ecos.sourceware.org
Class: ---
The new added d_type field of struct dirent is used to identify whether an
entry(i.e. the return value of readdir) is a file or a directory without
calling stat.
Calling stat should compare file names to find the exact entry for its stat
info, however, there are applications such as DPF(Digital Photo Frame) which
needs total disk scanning and certain operations of some certain type of files,
then stat function calling causes speed slow if there were ten thousands of
files on disk. After adding this d_type field of struct dirent, the entry
returned by readdir contains its file type(i.e. a file or a direcotry or a link
etc.), so without calling stat, the purpose can be achieved.
The implementation of this method in eCos is most like the one implemented in
linux.
Thanks
Sincerely Yours
--
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.