From: Sam Varshavchik <mrsam-W1w4QoW4mIDgLSHwZvcCBg@public.gmane.org>
To: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: What's the equivalent of readdirat()?
Date: Mon, 18 Feb 2008 17:00:21 -0500 [thread overview]
Message-ID: <cone.1203372021.37933.7234.500@commodore.email-scan.com> (raw)
In-Reply-To: 200802181426.44768.rob@landley.net
[-- Attachment #1: Type: text/plain, Size: 442 bytes --]
Rob Landley writes:
> 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.
No, it doesn't. readdir() takes an existing DIR pointer, that was previously
returned by opendir(3).
You will note that the opendir(3) man page also described an alternative
fdopendir() function, which in conjunction with openat(3) will do what you
want.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2008-02-18 22:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-18 20:26 What's the equivalent of readdirat()? Rob Landley
2008-02-18 22:00 ` Sam Varshavchik [this message]
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=cone.1203372021.37933.7234.500@commodore.email-scan.com \
--to=mrsam-w1w4qow4midglshwzvccbg@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