ps: print /dev/pts/* as numbers, not as "pts"
authorSimon Schubert <corecode@dragonflybsd.org>
Fri, 23 Oct 2009 20:47:31 +0000 (22:47 +0200)
committerSimon 'corecode' Schubert <corecode@fs.ei.tum.de>
Sun, 25 Oct 2009 00:41:46 +0000 (02:41 +0200)
bin/ps/print.c

index d5e582c..078aa19 100644 (file)
@@ -326,6 +326,8 @@ tname(const KINFO *k, const struct varent *vent)
                if (strncmp(ttname, "tty", 3) == 0 ||
                    strncmp(ttname, "cua", 3) == 0)
                        ttname += 3;
+               if (strncmp(ttname, "pts/", 4) == 0)
+                       ttname += 4;
                printf("%*.*s%c", vent->width-1, vent->width-1, ttname,
                        KI_PROC(k, auxflags) & KI_CTTY ? ' ' : '-');
        }