diff options
author | cognet <cognet@FreeBSD.org> | 2006-02-21 13:02:18 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2006-02-21 13:02:18 +0000 |
commit | 0f32580a804b1e9f14a9c6526e681433e2e4e822 (patch) | |
tree | 6ecc168758d952ff119f444faa83efb81947c94f /bin/ps | |
parent | 06cfdceb6c8993e73b4daaf984e0785ea75ddc34 (diff) | |
download | FreeBSD-src-0f32580a804b1e9f14a9c6526e681433e2e4e822.zip FreeBSD-src-0f32580a804b1e9f14a9c6526e681433e2e4e822.tar.gz |
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>
Diffstat (limited to 'bin/ps')
-rw-r--r-- | bin/ps/print.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 ? ' ' : '-'); } |