summaryrefslogtreecommitdiff
path: root/usr.bin/finger
diff options
context:
space:
mode:
authorsvn2git <svn2git@FreeBSD.org>1994-07-01 08:00:00 +0000
committersvn2git <svn2git@FreeBSD.org>1994-07-01 08:00:00 +0000
commit5e0e9b99dc3fc0ecd49d929db0d57c784b66f481 (patch)
treee779b5a6edddbb949b7990751b12d6f25304ba86 /usr.bin/finger
parenta16f65c7d117419bd266c28a1901ef129a337569 (diff)
Diffstat (limited to 'usr.bin/finger')
-rw-r--r--usr.bin/finger/sprint.c5
-rw-r--r--usr.bin/finger/util.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/finger/sprint.c b/usr.bin/finger/sprint.c
index 784237017d9c..9676de113773 100644
--- a/usr.bin/finger/sprint.c
+++ b/usr.bin/finger/sprint.c
@@ -88,8 +88,9 @@ sflag_print()
'*' : ' ');
if (*w->tty)
(void)printf("%-2.2s ",
- w->tty[0] != 't' || w->tty[1] != 't' ||
- w->tty[2] != 'y' ? w->tty : w->tty + 3);
+ strncmp(w->tty, "tty", 3) &&
+ strncmp(w->tty, "cua", 3) ?
+ w->tty : w->tty + 3);
else
(void)printf(" ");
if (w->info == LOGGEDIN) {
diff --git a/usr.bin/finger/util.c b/usr.bin/finger/util.c
index a2b6dd3e2dcb..30e996511188 100644
--- a/usr.bin/finger/util.c
+++ b/usr.bin/finger/util.c
@@ -55,7 +55,9 @@ find_idle_and_ttywrite(w)
struct stat sb;
char *strerror();
- (void)sprintf(tbuf, "%s/%s", _PATH_DEV, w->tty);
+ if (!strncmp(w->tty, "uu", 2))
+ return;
+ (void)sprintf(tbuf, "%s%s", _PATH_DEV, w->tty);
if (stat(tbuf, &sb) < 0) {
(void)fprintf(stderr,
"finger: %s: %s\n", tbuf, strerror(errno));