.\" Copyright (C) 1995 Andries Brouwer (aeb@cwi.nl)
.\"
+.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
.\"
.\" Written 11 June 1995 by Andries Brouwer <aeb@cwi.nl>
.\" Modified 22 July 1995 by Michael Chastain <mec@duracef.shout.net>:
.\" In 1.3.X, returns only one entry each time; return value is different.
.\" Modified 2004-12-01, mtk, fixed headers listed in SYNOPSIS
.\"
-.TH READDIR 2 2008-10-02 "Linux" "Linux Programmer's Manual"
+.TH READDIR 2 2013-06-21 "Linux" "Linux Programmer's Manual"
.SH NAME
readdir \- read directory entry
.SH SYNOPSIS
.BI "int readdir(unsigned int " fd ", struct old_linux_dirent *" dirp ","
.BI " unsigned int " count );
.fi
+
+.IR Note :
+There is no glibc wrapper for this system call; see NOTES.
.SH DESCRIPTION
This is not the function you are interested in.
Look at
.I d_reclen
is the size of
.IR d_name ,
-not counting the null terminator.
+not counting the terminating null byte (\(aq\\0\(aq).
.I d_name
is a null-terminated filename.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
On success, 1 is returned.
On end of directory, 0 is returned.
On error, \-1 is returned, and
.TP
.B ENOTDIR
File descriptor does not refer to a directory.
-.SH "CONFORMING TO"
+.SH CONFORMING TO
This system call is Linux-specific.
.SH NOTES
Glibc does not provide a wrapper for this system call; call it using
You will need to define the
.I old_linux_dirent
structure yourself.
-.SH "SEE ALSO"
+However, probably you should use
+.BR readdir (3)
+instead.
+
+This system call does not exist on x86-64.
+.SH SEE ALSO
.BR getdents (2),
.BR readdir (3)
+.SH COLOPHON
+This page is part of release 3.65 of the Linux
+.I man-pages
+project.
+A description of the project,
+and information about reporting bugs,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.