This is the mail archive of the ecos-patches@sourceware.org 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] 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.


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