aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2015-04-02 23:03:46 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2015-04-02 23:03:46 +0200
commit86a7f18f211af1abda5c855d2674b0fcb53de524 (patch)
tree9fd1eadb83bf48b29e9468ea8ff0e43c0736c245 /procps
parent1186894f773e13ab9ca2b3e05a194e9b88796fbe (diff)
downloadbusybox-w32-86a7f18f211af1abda5c855d2674b0fcb53de524.tar.gz
busybox-w32-86a7f18f211af1abda5c855d2674b0fcb53de524.tar.bz2
busybox-w32-86a7f18f211af1abda5c855d2674b0fcb53de524.zip
*: Switch to POSIX utmpx API
UTMP is SVID legacy, UTMPX is mandated by POSIX. Glibc and uClibc have identical layout of UTMP and UTMPX, both of these libc treat _PATH_UTMPX as _PATH_UTMP so from a user-perspective nothing changes except the names of the API entrypoints. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'procps')
-rw-r--r--procps/uptime.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/procps/uptime.c b/procps/uptime.c
index 778812a6f..149bae6e5 100644
--- a/procps/uptime.c
+++ b/procps/uptime.c
@@ -81,10 +81,10 @@ int uptime_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
81 81
82#if ENABLE_FEATURE_UPTIME_UTMP_SUPPORT 82#if ENABLE_FEATURE_UPTIME_UTMP_SUPPORT
83 { 83 {
84 struct utmp *ut; 84 struct utmpx *ut;
85 unsigned users = 0; 85 unsigned users = 0;
86 while ((ut = getutent()) != NULL) { 86 while ((ut = getutxent()) != NULL) {
87 if ((ut->ut_type == USER_PROCESS) && (ut->ut_name[0] != '\0')) 87 if ((ut->ut_type == USER_PROCESS) && (ut->ut_user[0] != '\0'))
88 users++; 88 users++;
89 } 89 }
90 printf(", %u users", users); 90 printf(", %u users", users);