For pts, print the pts number, instead of the full name. As it was, we ended

up always printing "pts".

Submitted by:	Michal Mertl <mime at traveller dot cz>
This commit is contained in:
Olivier Houchard 2006-02-21 13:02:18 +00:00
parent b457a3e19c
commit 7bd5296d29

View File

@ -366,6 +366,8 @@ tname(KINFO *k, VARENT *ve)
if (strncmp(ttname, "tty", 3) == 0 ||
strncmp(ttname, "cua", 3) == 0)
ttname += 3;
if (strncmp(ttname, "pts/", 4) == 0)
ttname += 4;
(void)printf("%*.*s%c", v->width - 1, v->width - 1, ttname,
k->ki_p->ki_kiflag & KI_CTTY ? ' ' : '-');
}