svn commit: r200067 - in head: lib/libulog usr.bin/users
Ed Schouten
ed at FreeBSD.org
Thu Dec 3 17:05:37 UTC 2009
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;
More information about the svn-src-head
mailing list