public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* What's the equivalent of readdirat()?
@ 2008-02-18 20:26 Rob Landley
  2008-02-18 22:00 ` Sam Varshavchik
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Landley @ 2008-02-18 20:26 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA

I'm moving some code to use openat() and friends, but there doesn't appear to 
be a readdirat().

The problem is that readdir(3) takes a path from cwd.  The syscall readdir(2) 
takes a file descriptor, but the man page for readdir(2) says it was 
supplanted by getdents.  The getdents man page says that's an internal 
syscall that glibc doesn't even bother to _wrap_, and points me back at 
readdir(3) which still takes a path from cwd...

None of the "see also" stuff at the end of any of these pages is useful.

Any hints?

Rob
-- 
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-18 22:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-18 20:26 What's the equivalent of readdirat()? Rob Landley
2008-02-18 22:00 ` Sam Varshavchik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox