Date: Fri, 8 Jan 2010 19:10:39 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r201816 - user/ed/utmpx/lib/libc/gen Message-ID: <201001081910.o08JAd6Z064976@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Fri Jan 8 19:10:39 2010 New Revision: 201816 URL: http://svn.freebsd.org/changeset/base/201816 Log: Add the missing sections to the manpage. Modified: user/ed/utmpx/lib/libc/gen/getutxent.3 Modified: user/ed/utmpx/lib/libc/gen/getutxent.3 ============================================================================== --- user/ed/utmpx/lib/libc/gen/getutxent.3 Fri Jan 8 19:01:50 2010 (r201815) +++ user/ed/utmpx/lib/libc/gen/getutxent.3 Fri Jan 8 19:10:39 2010 (r201816) @@ -344,8 +344,94 @@ All entries whose type has not been prev by this implementation of .Fn pututxline . .Sh RETURN VALUES +The +.Fn getutxent , +.Fn getutxid , +.Fn getutxline , +and +.Fn getutxuser +functions return a pointer to an +.Vt utmpx +structure that matches the mentioned constraints on success or +.Dv NULL +when reaching the end-of-file or when an error occurs. +.Pp +The +.Fn pututxline +function returns a pointer to an +.Vt utmpx +structure containing a copy of the structure written to disk upon +success. +It returns +.Dv NULL +when the provided +.Vt utmpx +is invalid. +This may be because +.Fa ut_type +is invalid or +.Fa ut_type +has a value of +.Dv DEAD_PROCESS +and an entry with an identifier with a value equal to the field +.Fa ut_id +was not found. +.Pp +The +.Fn setutxdb +function returns 0 if the user accounting database was opened +successfully. +Otherwise, a -1 is returned and the global variable +.Va errno +is set to indicate the error. +.Sh ERRORS +In addition to the error conditions described in +.Xr fopen 3 , +the +.Fn setutxdb +function can generate the following errors: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa type +argument contains a value not supported by this implementation. +.It Bq Er EFTYPE +The file format is invalid. +.El .Sh SEE ALSO +.Xr ac 8 , +.Xr getpid 2 , +.Xr gettimeofday 2 , +.Xr last 1 , +.Xr newsyslog 8 , +.Xr tty 4 , +.Xr write 1 .Sh STANDARDS +The +.Fn endutxent , +.Fn getutxent , +.Fn getutxid , +.Fn getutxline , +.Fn pututxline +and +.Fn setutxent +functions are expected to conform to +.St -p1003.1-2008 . +.Pp +The +.Fn getutxuser +and +.Fn setutxdb +functions and the +.Fa ut_host +field of the +.Vt utmpx +structure are extensions. .Sh HISTORY These functions appeared in .Fx 9.0 . +They replaced the +.In utmp.h +interface. +.Sh AUTHORS +.An Ed Schouten Aq ed@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001081910.o08JAd6Z064976>