getdents.2: Tweaks to Petr Vorel's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2020-04-14 11:42:21 +02:00
parent f5f6969dee
commit dfa3ae9b3f
1 changed files with 16 additions and 7 deletions

View File

@ -40,8 +40,9 @@ getdents, getdents64 \- get directory entries
.fi
.PP
.IR Note :
There is no glibc wrapper for getdents().
Wrapper for getdents64() was added in glibc 2.30; see NOTES.
There is no glibc wrapper for
.BR getdents ();
see NOTES.
.SH DESCRIPTION
These are not the interfaces you are interested in.
Look at
@ -204,18 +205,26 @@ File descriptor does not refer to a directory.
SVr4.
.\" SVr4 documents additional ENOLINK, EIO error conditions.
.SH NOTES
Library support for getdents64() was added in glibc 2.30;
there is no glibc wrapper for getdents();
call getdents() (or getdents64() on earlier versions) requires using
Library support for
.BR getdents64 ()
was added in glibc 2.30;
there is no glibc wrapper for
.BR getdents ().
Calling
.BR getdents ()
(or
.BR getdents64 ()
on earlier glibc versions) requires the use of
.BR syscall (2).
In that case you will need to define the
.I linux_dirent
or
.I linux_dirent64
structure yourself.
However, you probably want to use
.PP
Probably, you probably want to use
.BR readdir (3)
instead.
instead of these system calls.
.PP
These calls supersede
.BR readdir (2).