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)
Sun, Oct 12, 5:24 AM
Unknown Object (File)
Fri, Oct 3, 3:32 PM
Unknown Object (File)
Wed, Oct 1, 11:05 AM
Unknown Object (File)
Wed, Sep 24, 12:46 PM
Unknown Object (File)
Mon, Sep 22, 9:31 PM
Unknown Object (File)
Sun, Sep 21, 5:27 PM
Unknown Object (File)
Sat, Sep 20, 4:29 PM
Unknown Object (File)
Sat, Sep 20, 12:12 PM
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