History log of /src/lib/libc/gen/readdir.c (Results 1 – 25 of 150)
Revision Date Author Comments
# d20c8250 11-Sep-2025 Dag-Erling Smørgrav <des@FreeBSD.org>

Revert "libc: Remove readdir_r(3)"

This reverts commit d549de769055ae6116601e54e4c86dfb3e17f4c4.


# d549de76 10-Sep-2025 Dag-Erling Smørgrav <des@FreeBSD.org>

libc: Remove readdir_r(3)

This function was never safe to use. We marked it deprecated in the
manual page in 2016, and it is marked obsolete in POSIX 2024. We
previously added a linker warning and

libc: Remove readdir_r(3)

This function was never safe to use. We marked it deprecated in the
manual page in 2016, and it is marked obsolete in POSIX 2024. We
previously added a linker warning and annotated the prototype; now that
stable/15 has been branched, we can remove it from main.

Relnotes: yes
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D52474

show more ...


# 2bd157bc 01-Aug-2025 Dag-Erling Smørgrav <des@FreeBSD.org>

libc: Deprecate readdir_r()

This function was never safe to use. We marked it deprecated in the
manual page in 2016, and it is marked obsolete in POSIX 2024. Add a
linker warning and annotate the

libc: Deprecate readdir_r()

This function was never safe to use. We marked it deprecated in the
manual page in 2016, and it is marked obsolete in POSIX 2024. Add a
linker warning and annotate the prototype.

Sponsored by: Klara, Inc.
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D51681

show more ...


# 920b2183 11-Jul-2025 Dag-Erling Smørgrav <des@FreeBSD.org>

readdir: Fix error check.

Now that dd_size is unsigned, we need to check if the return value from
getdirentries() was negative before assigning it to dd_size.

While here, simplify the scandir_error

readdir: Fix error check.

Now that dd_size is unsigned, we need to check if the return value from
getdirentries() was negative before assigning it to dd_size.

While here, simplify the scandir_error test case slightly, and verify
that calling readdir() again after EOF still returns NULL.

Fixes: 42e613018da5
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D51266

show more ...


# 42e61301 09-Jul-2025 Dag-Erling Smørgrav <des@FreeBSD.org>

opendir, readdir, telldir: Use the correct types.

Use either size_t or off_t (as appropriate) instead of long.

Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.f

opendir, readdir, telldir: Use the correct types.

Use either size_t or off_t (as appropriate) instead of long.

Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D51210

show more ...


# dc36d6f9 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

lib: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl s

lib: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix

show more ...


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# d20c8250 11-Sep-2025 Dag-Erling Smørgrav <des@FreeBSD.org>

Revert "libc: Remove readdir_r(3)"

This reverts commit d549de769055ae6116601e54e4c86dfb3e17f4c4.


# d549de76 10-Sep-2025 Dag-Erling Smørgrav <des@FreeBSD.org>

libc: Remove readdir_r(3)

This function was never safe to use. We marked it deprecated in the
manual page in 2016, and it is marked obsolete in POSIX 2024. We
previously added a linker warning and

libc: Remove readdir_r(3)

This function was never safe to use. We marked it deprecated in the
manual page in 2016, and it is marked obsolete in POSIX 2024. We
previously added a linker warning and annotated the prototype; now that
stable/15 has been branched, we can remove it from main.

Relnotes: yes
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D52474

show more ...


# 2bd157bc 01-Aug-2025 Dag-Erling Smørgrav <des@FreeBSD.org>

libc: Deprecate readdir_r()

This function was never safe to use. We marked it deprecated in the
manual page in 2016, and it is marked obsolete in POSIX 2024. Add a
linker warning and annotate the

libc: Deprecate readdir_r()

This function was never safe to use. We marked it deprecated in the
manual page in 2016, and it is marked obsolete in POSIX 2024. Add a
linker warning and annotate the prototype.

Sponsored by: Klara, Inc.
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D51681

show more ...


# 920b2183 11-Jul-2025 Dag-Erling Smørgrav <des@FreeBSD.org>

readdir: Fix error check.

Now that dd_size is unsigned, we need to check if the return value from
getdirentries() was negative before assigning it to dd_size.

While here, simplify the scandir_error

readdir: Fix error check.

Now that dd_size is unsigned, we need to check if the return value from
getdirentries() was negative before assigning it to dd_size.

While here, simplify the scandir_error test case slightly, and verify
that calling readdir() again after EOF still returns NULL.

Fixes: 42e613018da5
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D51266

show more ...


# 42e61301 09-Jul-2025 Dag-Erling Smørgrav <des@FreeBSD.org>

opendir, readdir, telldir: Use the correct types.

Use either size_t or off_t (as appropriate) instead of long.

Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.f

opendir, readdir, telldir: Use the correct types.

Use either size_t or off_t (as appropriate) instead of long.

Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D51210

show more ...


# dc36d6f9 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

lib: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl s

lib: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix

show more ...


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# c1920558 03-Jul-2018 John Baldwin <jhb@FreeBSD.org>

Clean up the vcs ID strings in libc's gen/ directory.

- Move CSRG IDs into __SCCSID().
- When a file has been copied, consistently use 'From: <tag>' for strings
referencing the version of the sour

Clean up the vcs ID strings in libc's gen/ directory.

- Move CSRG IDs into __SCCSID().
- When a file has been copied, consistently use 'From: <tag>' for strings
referencing the version of the source file copied from in the license
block comment.
- Some of the 'From:' tags were using $FreeBSD$ that was being expanded on
each checkout. Fix those to hardcode the FreeBSD tag from the file that
was copied at the time of the copy.
- When multiple strings are present list them in "chronological" order,
so CSRG (__SCCSID) before FreeBSD (__FBSDID). If a file came from
OtherBSD and contains a CSRG ID from the OtherBSD file, use the order
CSRG -> OtherBSD -> FreeBSD.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D15831

show more ...


# 82725ba9 23-Nov-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Merge ^/head r325999 through r326131.


# 8a16b7a1 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier f

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.

show more ...


# d02c951f 26-May-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r318658 through r318963.


# 69921123 23-May-2017 Konstantin Belousov <kib@FreeBSD.org>

Commit the 64-bit inode project.

Extend the ino_t, dev_t, nlink_t types to 64-bit ints. Modify
struct dirent layout to add d_off, increase the size of d_fileno
to 64-bits, increase the size of d_na

Commit the 64-bit inode project.

Extend the ino_t, dev_t, nlink_t types to 64-bit ints. Modify
struct dirent layout to add d_off, increase the size of d_fileno
to 64-bits, increase the size of d_namlen to 16-bits, and change
the required alignment. Increase struct statfs f_mntfromname[] and
f_mntonname[] array length MNAMELEN to 1024.

ABI breakage is mitigated by providing compatibility using versioned
symbols, ingenious use of the existing padding in structures, and
by employing other tricks. Unfortunately, not everything can be
fixed, especially outside the base system. For instance, third-party
APIs which pass struct stat around are broken in backward and
forward incompatible ways.

Kinfo sysctl MIBs ABI is changed in backward-compatible way, but
there is no general mechanism to handle other sysctl MIBS which
return structures where the layout has changed. It was considered
that the breakage is either in the management interfaces, where we
usually allow ABI slip, or is not important.

Struct xvnode changed layout, no compat shims are provided.

For struct xtty, dev_t tty device member was reduced to uint32_t.
It was decided that keeping ABI compat in this case is more useful
than reporting 64-bit dev_t, for the sake of pstat.

Update note: strictly follow the instructions in UPDATING. Build
and install the new kernel with COMPAT_FREEBSD11 option enabled,
then reboot, and only then install new world.

Credits: The 64-bit inode project, also known as ino64, started life
many years ago as a project by Gleb Kurtsou (gleb). Kirk McKusick
(mckusick) then picked up and updated the patch, and acted as a
flag-waver. Feedback, suggestions, and discussions were carried
by Ed Maste (emaste), John Baldwin (jhb), Jilles Tjoelker (jilles),
and Rick Macklem (rmacklem). Kris Moore (kris) performed an initial
ports investigation followed by an exp-run by Antoine Brodin (antoine).
Essential and all-embracing testing was done by Peter Holm (pho).
The heavy lifting of coordinating all these efforts and bringing the
project to completion were done by Konstantin Belousov (kib).

Sponsored by: The FreeBSD Foundation (emaste, kib)
Differential revision: https://reviews.freebsd.org/D10439

show more ...


# 348238db 01-Mar-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r314420 through r314481.


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96

show more ...


# 11d38a57 28-Oct-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Merge from head

Sponsored by: Gandi.net


# becbad1f 13-Oct-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Merge from head


# 5a2b666c 01-Oct-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Merge from head


# 0f405ee7 28-Sep-2015 Navdeep Parhar <np@FreeBSD.org>

Sync up with head (up to r288341).


123456