From 0f32580a804b1e9f14a9c6526e681433e2e4e822 Mon Sep 17 00:00:00 2001 From: cognet Date: Tue, 21 Feb 2006 13:02:18 +0000 Subject: For pts, print the pts number, instead of the full name. As it was, we ended up always printing "pts". Submitted by: Michal Mertl --- bin/ps/print.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bin/ps') diff --git a/bin/ps/print.c b/bin/ps/print.c index 1870c53..081c4f5 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -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 ? ' ' : '-'); } -- cgit v1.1