diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 1994-09-27 01:00:18 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 1994-09-27 01:00:18 +0000 |
| commit | 255318a894151d22949adb1424bdb28f251d8d02 (patch) | |
| tree | e1ea313cd114b96799ab02289de0ec5cb4806447 /usr.bin/w | |
| parent | 55178249905ef5625633fa5c540ac4c04e7b370f (diff) | |
Notes
Diffstat (limited to 'usr.bin/w')
| -rw-r--r-- | usr.bin/w/pr_time.c | 3 | ||||
| -rw-r--r-- | usr.bin/w/w.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/w/pr_time.c b/usr.bin/w/pr_time.c index 87fffb363331..73e44faeae93 100644 --- a/usr.bin/w/pr_time.c +++ b/usr.bin/w/pr_time.c @@ -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); diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c index 1a7b5268bcd7..9d1e06067888 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -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); |
