Print this page
3124 Remove any existing references to utmp, use utmpx instead
*** 231,241 ****
}
argc--; argv++;
}
/*
! * read the UTMP_FILE (contains information about each logged in user)
*/
if (stat(UTMPX_FILE, &sbuf) == ERR) {
(void) fprintf(stderr, gettext("%s: stat error of %s: %s\n"),
prog, UTMPX_FILE, strerror(errno));
exit(1);
--- 231,241 ----
}
argc--; argv++;
}
/*
! * read the UTMPX_FILE (contains information about each logged in user)
*/
if (stat(UTMPX_FILE, &sbuf) == ERR) {
(void) fprintf(stderr, gettext("%s: stat error of %s: %s\n"),
prog, UTMPX_FILE, strerror(errno));
exit(1);
*** 262,272 ****
if (header) { /* print a header */
prtat(&now);
for (ut = utmpbegin; ut < utmpend; ut++) {
if (ut->ut_type == USER_PROCESS) {
! if (!nonuser(*ut))
nusers++;
} else if (ut->ut_type == BOOT_TIME) {
uptime = now - ut->ut_xtime;
uptime += 30;
days = uptime / (60*60*24);
--- 262,272 ----
if (header) { /* print a header */
prtat(&now);
for (ut = utmpbegin; ut < utmpend; ut++) {
if (ut->ut_type == USER_PROCESS) {
! if (!nonuserx(*ut))
nusers++;
} else if (ut->ut_type == BOOT_TIME) {
uptime = now - ut->ut_xtime;
uptime += 30;
days = uptime / (60*60*24);