diff options
author | ed <ed@FreeBSD.org> | 2008-11-01 13:40:46 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2008-11-01 13:40:46 +0000 |
commit | 57b4089c2088a6a5dce2d7562cbb012f840d9c27 (patch) | |
tree | f6ba7119664a346582a4fda37a818b33ca7c9e5d /sys/kern | |
parent | c2c324d37976496417e7195d8daae3975be8eaa1 (diff) | |
download | FreeBSD-src-57b4089c2088a6a5dce2d7562cbb012f840d9c27.zip FreeBSD-src-57b4089c2088a6a5dce2d7562cbb012f840d9c27.tar.gz |
Clamp the values of t_column to 5 digits in `pstat -t' and `show all ttys'.
We often run into these very high column numbers when we run curses
applications, because they don't print any newlines. This messes up the
table output of `pstat -t'. If these numbers get really high, they
aren't of any use to the reader anyway. Convert them to `99999' when
they run out of bounds.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/tty.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 8f6f9b2..cdabafc 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -2007,7 +2007,7 @@ DB_SHOW_ALL_COMMAND(ttys, db_show_all_ttys) osiz, tp->t_outq.to_end - tp->t_outq.to_begin, osiz - tp->t_outlow, - tp->t_column, + MIN(tp->t_column, 99999), tp->t_session ? tp->t_session->s_sid : 0, tp->t_pgrp ? tp->t_pgrp->pg_id : 0); |