From: Rob Landley <rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org>
To: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: What's the equivalent of readdirat()?
Date: Mon, 18 Feb 2008 14:26:44 -0600 [thread overview]
Message-ID: <200802181426.44768.rob@landley.net> (raw)
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.
next reply other threads:[~2008-02-18 20:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-18 20:26 Rob Landley [this message]
2008-02-18 22:00 ` What's the equivalent of readdirat()? Sam Varshavchik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200802181426.44768.rob@landley.net \
--to=rob-voji6fs/r0vr7s880joybq@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox