Page MenuHomeFreeBSD

libc: Add fscandir(), fscandir_b(), scandirat_b().
ClosedPublic

Authored by des on Jun 19 2025, 10:14 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 5, 12:23 PM
Unknown Object (File)
Thu, Mar 5, 12:05 PM
Unknown Object (File)
Thu, Mar 5, 12:05 PM
Unknown Object (File)
Mon, Mar 2, 9:22 PM
Unknown Object (File)
Fri, Feb 27, 12:55 PM
Unknown Object (File)
Tue, Feb 24, 6:13 PM
Unknown Object (File)
Tue, Feb 24, 10:46 AM
Unknown Object (File)
Tue, Feb 24, 10:45 AM
Subscribers

Details

Summary

While here, clean up scandir() a bit and improve the documentation.

MFC after: never
Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Jun 19 2025, 10:14 AM
markj added a subscriber: markj.
markj added inline comments.
lib/libc/gen/scandir.3
239

scandirat() is also in glibc--should it be referred to as a GNU extension as well?

lib/libc/gen/scandir.c
181

A bit off-topic for the review, but I wonder why scandir() isn't careful to preserve errno. Is that a bug?

This revision is now accepted and ready to land.Jun 19 2025, 1:42 PM

review feedback, more tests and cleanup

This revision now requires review to proceed.Jun 19 2025, 4:11 PM
des marked 2 inline comments as done.Jun 19 2025, 4:14 PM
This revision is now accepted and ready to land.Jun 19 2025, 7:22 PM