The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v2 0/2] nolibc: Add dirfd()
@ 2026-10-07  5:29 Daniel Palmer
  2026-10-07  5:29 ` [PATCH v2 1/2] tools/nolibc: " Daniel Palmer
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Daniel Palmer @ 2026-10-07  5:29 UTC (permalink / raw)
  To: w, linux; +Cc: linux-kernel, Daniel Palmer

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


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

end of thread, other threads:[~2026-10-12  7:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-07  5:29 [PATCH v2 0/2] nolibc: Add dirfd() Daniel Palmer
2026-10-07  5:29 ` [PATCH v2 1/2] tools/nolibc: " 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

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