diff options
author | peter <peter@FreeBSD.org> | 1995-09-26 17:48:59 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1995-09-26 17:48:59 +0000 |
commit | 5a3733e33dd63da58b28eb2ea6df25d4090dab5e (patch) | |
tree | eb90e8805e1e348568dee5f1f8a3cbf37a20cc9b /bin | |
parent | 8d2c8c2164b2a032b537a49fb198ccebe58e9af5 (diff) | |
download | FreeBSD-src-5a3733e33dd63da58b28eb2ea6df25d4090dab5e.zip FreeBSD-src-5a3733e33dd63da58b28eb2ea6df25d4090dab5e.tar.gz |
Correct the alignment of the tty column, which was affected by my change to
allow more than two tty characters.
David Greenman pointed out that when a process that had been revoked from
it's controlling tty, the "-" sign was detached from any two-character
names.
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ps/keyword.c | 4 | ||||
-rw-r--r-- | bin/ps/print.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index 8dc8c14..23b5b2b 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: keyword.c,v 1.5 1994/10/02 08:33:28 davidg Exp $ + * $Id: keyword.c,v 1.6 1995/09/04 01:22:40 peter Exp $ */ #ifndef lint @@ -161,7 +161,7 @@ VAR var[] = { {"tpgid", "TPGID", NULL, 0, evar, 4, EOFF(e_tpgid), ULONG, PIDFMT}, {"tsess", "TSESS", NULL, 0, evar, 6, EOFF(e_tsess), KPTR, "x"}, {"tsiz", "TSIZ", NULL, 0, tsize, 4}, - {"tt", "TT", NULL, LJUST, tname, 4}, + {"tt", "TT ", NULL, 0, tname, 4}, {"tty", "TTY", NULL, LJUST, longtname, 8}, {"ucomm", "UCOMM", NULL, LJUST, ucomm, MAXCOMLEN}, {"uid", "UID", NULL, 0, evar, UIDLEN, EOFF(e_ucred.cr_uid), diff --git a/bin/ps/print.c b/bin/ps/print.c index 56b98f7..e64a6b0 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: print.c,v 1.8 1995/08/07 19:17:39 wollman Exp $ + * $Id: print.c,v 1.9 1995/09/04 01:22:41 peter Exp $ */ #ifndef lint @@ -322,12 +322,12 @@ tname(k, ve) v = ve->var; dev = KI_EPROC(k)->e_tdev; if (dev == NODEV || (ttname = devname(dev, S_IFCHR)) == NULL) - (void)printf("%-*s", v->width, "??"); + (void)printf("%*s ", v->width-1, "??"); else { if (strncmp(ttname, "tty", 3) == 0 || strncmp(ttname, "cua", 3) == 0) ttname += 3; - (void)printf("%-*.*s%c", v->width-1, v->width-1, ttname, + (void)printf("%*.*s%c", v->width-1, v->width-1, ttname, KI_EPROC(k)->e_flag & EPROC_CTTY ? ' ' : '-'); } } |