X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=original%2Fman3%2Fgetutent.3;h=ae40642b1ba3a1b3e41deb530de4600c3b722c02;hb=361fd72f831aabd8a0aa6fe7bc4ef66ef4f89a1b;hp=13bd9e788f2d70e3195622c3603f57be8332607d;hpb=8fbe23d0114c8804c4cfb5b6c57f3ca09c8fee1d;p=linuxjm%2FLDP_man-pages.git
diff --git a/original/man3/getutent.3 b/original/man3/getutent.3
index 13bd9e78..ae40642b 100644
--- a/original/man3/getutent.3
+++ b/original/man3/getutent.3
@@ -1,5 +1,6 @@
.\" Copyright 1995 Mark D. Roth (roth@uiuc.edu)
.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
@@ -16,9 +17,9 @@
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
-.\" License along with this manual; if not, write to the Free
-.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
-.\" USA.
+.\" License along with this manual; if not, see
+.\" .
+.\" %%%LICENSE_END
.\"
.\" References consulted:
.\" Linux libc source code
@@ -27,7 +28,7 @@
.\" Modified Thu Jul 25 14:43:46 MET DST 1996 by Michael Haardt
.\"
.\"
-.TH GETUTENT 3 2008-06-29 "" "Linux Programmer's Manual"
+.TH GETUTENT 3 2013-04-19 "" "Linux Programmer's Manual"
.SH NAME
getutent, getutid, getutline, pututline, setutent, endutent,
utmpname \- access utmp file entries
@@ -114,7 +115,7 @@ the new entry.
If it cannot find an appropriate slot for \fIut\fP,
.BR pututline ()
will append the new entry to the end of the file.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
.BR getutent (),
.BR getutid (),
and
@@ -132,6 +133,10 @@ on failure, it returns NULL.
.BR utmpname ()
returns 0 if the new name was successfully stored, or \-1 on failure.
+
+In the event of an error, these functions
+.I errno
+set to indicate the cause.
.SH ERRORS
.TP
.B ENOMEM
@@ -143,14 +148,14 @@ Record not found.
.BR setutent (),
.BR pututline (),
and the
-.B getut* ()
+.BR getut* ()
functions can also fail for the reasons described in
.BR open (2).
.SH FILES
/var/run/utmp database of currently logged-in users
.br
/var/log/wtmp database of past user logins
-.SH "CONFORMING TO"
+.SH CONFORMING TO
XPG2, SVr4.
.LP
In XPG2 and SVID 2 the function
@@ -200,16 +205,19 @@ and
.LP
Linux glibc on the other hand does not use a parallel \fIutmpx\fP file
since its \fIutmp\fP structure is already large enough.
-The functions \fBgetutxent\fP()
-etc. are aliases for \fBgetutent\fP() etc.
+The "x" functions listed above are just aliases for
+their counterparts without the "x" (e.g.,
+.BR getutxent ()
+is an alias for
+.BR getutent ()).
.SH NOTES
-.SS Glibc Notes
+.SS Glibc notes
The above functions are not thread-safe.
Glibc adds reentrant versions
.sp
.nf
.BR "#define _GNU_SOURCE" " /* or _SVID_SOURCE or _BSD_SOURCE;
-.R "\& see feature_test_macros(7) */
+.RB "\& see " feature_test_macros "(7) */"
.B #include
.sp
.BI "int getutent_r(struct utmp *" ubuf ", struct utmp **" ubufp );
@@ -228,7 +236,7 @@ The
argument gives these functions a place to store their result.
On success they return 0, and a pointer to the result is written in
.IR *ubufp .
-On error these functions return \-1.
+On error, these functions return \-1.
There are no utmpx equivalents of the above functions.
(POSIX.1 does not specify such functions.)
.SH EXAMPLE
@@ -281,6 +289,14 @@ main(int argc, char *argv[])
exit(EXIT_SUCCESS);
}
.fi
-.SH "SEE ALSO"
+.SH SEE ALSO
.BR getutmp (3),
.BR utmp (5)
+.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/.