From: Daniel Palmer <daniel@thingy.jp>
To: w@1wt.eu, linux@weissschuh.net
Cc: linux-kernel@vger.kernel.org, Daniel Palmer <daniel@thingy.jp>
Subject: [PATCH v2 0/2] nolibc: Add dirfd()
Date: Wed, 7 Oct 2026 14:29:11 +0900 [thread overview]
Message-ID: <20261007052914.888956-1-daniel@thingy.jp> (raw)
Add dirfd() to convert a DIR back to an fd for functions like fstatat()
that take an fd.
Change log:
v2 - Fix the name of the dirfd helper, I debated over removing the helper
as suggested by Thomas but it seems right to have the logic in a single
place.
Add test a basic test to make sure dirfd() actually does convert back
to the expected fd and using dirfd() with fstatat().
Daniel Palmer (2):
tools/nolibc: Add dirfd()
selftests/nolibc: Add test for dirfd()
tools/include/nolibc/dirent.h | 38 ++++++++++++----
tools/testing/selftests/nolibc/nolibc-test.c | 47 ++++++++++++++++++++
2 files changed, 77 insertions(+), 8 deletions(-)
--
2.53.0
next reply other threads:[~2026-10-07 5:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 5:29 Daniel Palmer [this message]
2026-10-07 5:29 ` [PATCH v2 1/2] tools/nolibc: Add dirfd() Daniel Palmer
2026-10-07 8:03 ` Thomas Weißschuh
2026-10-08 7:59 ` David Laight
2026-10-12 7:29 ` Daniel Palmer
2026-10-07 5:29 ` [PATCH v2 2/2] selftests/nolibc: Add test for dirfd() Daniel Palmer
2026-10-07 8:09 ` Thomas Weißschuh
2026-10-12 7:34 ` Daniel Palmer
2026-10-07 6:43 ` [PATCH v2 0/2] nolibc: Add dirfd() Willy Tarreau
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=20261007052914.888956-1-daniel@thingy.jp \
--to=daniel@thingy.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=w@1wt.eu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.