This is the mail archive of the libc-hacker@cygnus.com mailing list for the glibc project.


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

readdir changes


Hi,

I've checked in some optimization changes for readdir which are known
to break Hurd.  Nothing severe.

The reason why I used this way is that the current Hurd implementation
of getdirentries isn't correct.  As Roland explained me Hurd needs an
offset for the readdir function since it not kept internally (as on
Unix).  But the getdirentries function on BSD uses the basep parameter
only for output.  The value is not used for positioning.

For this reason I've changed the shared readdir implementation to use
a new function __getdents.  I expect that the Hurd people come up with
an appropriate definition.  It might be that the parameter I removed
from the call in readdir is necessary.  In this case please make sure
it is only used for Hurd since Unix implementations don't need it.

Oh, the effect of the change is that there are no unnecessary lseek()
syscalls performed for the readdir function calls.  Just take a look
at `strace ls`.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------


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