OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man2 / readdir.2
index 4d4ae60..cac5437 100644 (file)
@@ -1,5 +1,6 @@
 .\" 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
@@ -34,6 +36,9 @@ readdir \- read directory entry
 .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
@@ -80,10 +85,10 @@ is the distance from the start of the directory to this
 .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
@@ -106,7 +111,7 @@ No such directory.
 .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
@@ -114,6 +119,20 @@ 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.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.