diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/w/w.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c index 8f69ab6..379e6a4 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -239,21 +239,16 @@ main(int argc, char *argv[]) nextp = &ep->next; memmove(&ep->utmp, &utmp, sizeof(struct utmp)); ep->tdev = stp->st_rdev; -#ifdef CPU_CONSDEV /* * If this is the console device, attempt to ascertain * the true console device dev_t. */ if (ep->tdev == 0) { - int mib[2]; size_t size; - mib[0] = CTL_MACHDEP; - mib[1] = CPU_CONSDEV; size = sizeof(dev_t); - (void)sysctl(mib, 2, &ep->tdev, &size, NULL, 0); + (void)sysctlbyname("machdep.consdev", &ep->tdev, &size, NULL, 0); } -#endif touched = stp->st_atime; if (touched < ep->utmp.ut_time) { /* tty untouched since before login */ |