From owner-svn-src-user@FreeBSD.ORG Fri Jan 8 19:10:40 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37BB21065670; Fri, 8 Jan 2010 19:10:40 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E4CB8FC0C; Fri, 8 Jan 2010 19:10:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o08JAdxh064978; Fri, 8 Jan 2010 19:10:39 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08JAd6Z064976; Fri, 8 Jan 2010 19:10:39 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201001081910.o08JAd6Z064976@svn.freebsd.org> From: Ed Schouten Date: Fri, 8 Jan 2010 19:10:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201816 - user/ed/utmpx/lib/libc/gen X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 19:10:40 -0000 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