From owner-svn-src-head@FreeBSD.ORG Thu Dec 3 17:05:37 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 161921065672; Thu, 3 Dec 2009 17:05:37 +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 E049A8FC1B; Thu, 3 Dec 2009 17:05:36 +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 nB3H5aP6020337; Thu, 3 Dec 2009 17:05:36 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB3H5amN020332; Thu, 3 Dec 2009 17:05:36 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200912031705.nB3H5amN020332@svn.freebsd.org> From: Ed Schouten Date: Thu, 3 Dec 2009 17:05:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200067 - in head: lib/libulog usr.bin/users X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2009 17:05:37 -0000 Author: ed Date: Thu Dec 3 17:05:36 2009 New Revision: 200067 URL: http://svn.freebsd.org/changeset/base/200067 Log: Use USER_PROCESS instead of LOGIN_PROCESS. POSIX isn't clear about how the fields should be used, but according to utmpx(5) on Linux, LOGIN_PROCESS refers to a TTY that's still running a getty. Modified: head/lib/libulog/ulog.h head/lib/libulog/ulog_getutxent.3 head/lib/libulog/ulog_getutxent.c head/usr.bin/users/users.c Modified: head/lib/libulog/ulog.h ============================================================================== --- head/lib/libulog/ulog.h Thu Dec 3 16:42:18 2009 (r200066) +++ head/lib/libulog/ulog.h Thu Dec 3 17:05:36 2009 (r200067) @@ -71,11 +71,11 @@ struct ulog_utmpx { #endif #define OLD_TIME 2 #define NEW_TIME 3 -#if 0 #define USER_PROCESS 4 +#if 0 #define INIT_PROCESS 5 -#endif #define LOGIN_PROCESS 6 +#endif #define DEAD_PROCESS 7 #define SHUTDOWN_TIME 8 Modified: head/lib/libulog/ulog_getutxent.3 ============================================================================== --- head/lib/libulog/ulog_getutxent.3 Thu Dec 3 16:42:18 2009 (r200066) +++ head/lib/libulog/ulog_getutxent.3 Thu Dec 3 17:05:36 2009 (r200067) @@ -73,15 +73,15 @@ The .Fa ut_type field contains the type of the message, which may have one of the following values: -.Bl -tag -width LOGIN_PROCESS +.Bl -tag -width SHUTDOWN_TIME .It Dv EMPTY No valid user accounting information. .It Dv OLD_TIME Identifies time when system clock changed. .It Dv NEW_TIME Identifies time after system clock changed. -.It Dv LOGIN_PROCESS -Identifies the session leader of a logged in user. +.It Dv USER_PROCESS +Identifies a process. .It Dv DEAD_PROCESS Identifies a session leader who has exited. .It Dv SHUTDOWN_TIME Modified: head/lib/libulog/ulog_getutxent.c ============================================================================== --- head/lib/libulog/ulog_getutxent.c Thu Dec 3 16:42:18 2009 (r200066) +++ head/lib/libulog/ulog_getutxent.c Thu Dec 3 17:05:36 2009 (r200067) @@ -82,7 +82,7 @@ ulog_getutxent(void) else if (MATCH(user, "") && MATCH(host, "")) utx.ut_type = DEAD_PROCESS; else if (!MATCH(user, "")) - utx.ut_type = LOGIN_PROCESS; + utx.ut_type = USER_PROCESS; else utx.ut_type = EMPTY; Modified: head/usr.bin/users/users.c ============================================================================== --- head/usr.bin/users/users.c Thu Dec 3 16:42:18 2009 (r200066) +++ head/usr.bin/users/users.c Thu Dec 3 17:05:36 2009 (r200067) @@ -80,7 +80,7 @@ main(int argc, char **argv) ulog_setutxent(); while ((ut = ulog_getutxent()) != NULL) { - if (ut->ut_type != LOGIN_PROCESS) + if (ut->ut_type != USER_PROCESS) continue; if (ncnt >= nmax) { nmax += 32;