mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-21 16:32:25 +01:00
idle time == 0 printed now as "-" like in good old BSD
skip cua* 3 chars as tty* 3 lchars
This commit is contained in:
parent
5517824990
commit
255318a894
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3138
@ -98,6 +98,9 @@ pr_idle(idle)
|
||||
(void)printf(" %2d:%02d ",
|
||||
idle / SECSPERHOUR, (idle % SECSPERHOUR) / SECSPERMIN);
|
||||
|
||||
else if (idle / SECSPERMIN == 0)
|
||||
(void)printf(" - ");
|
||||
|
||||
/* Else print the minutes idle. */
|
||||
else
|
||||
(void)printf(" %2d ", idle / SECSPERMIN);
|
||||
|
@ -312,7 +312,8 @@ main(argc, argv)
|
||||
}
|
||||
(void)printf("%-*.*s %-2.2s %-*.*s ",
|
||||
UT_NAMESIZE, UT_NAMESIZE, ep->utmp.ut_name,
|
||||
strncmp(ep->utmp.ut_line, "tty", 3) ?
|
||||
strncmp(ep->utmp.ut_line, "tty", 3) &&
|
||||
strncmp(ep->utmp.ut_line, "cua", 3) ?
|
||||
ep->utmp.ut_line : ep->utmp.ut_line + 3,
|
||||
UT_HOSTSIZE, UT_HOSTSIZE, *p ? p : "-");
|
||||
pr_attime(&ep->utmp.ut_time, &now);
|
||||
|
Loading…
Reference in New Issue
Block a user