summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2006-05-01 00:26:43 +0000
committerbde <bde@FreeBSD.org>2006-05-01 00:26:43 +0000
commit5d1c9f88558c7b5da179af3e8681ba58f22591f2 (patch)
tree766d52216c3c46a36358d38e92e8b0ce66acb8c5 /usr.bin/systat
parent1f6c44f8b0e32001880ce3e52f1e9520026250e8 (diff)
downloadFreeBSD-src-5d1c9f88558c7b5da179af3e8681ba58f22591f2.zip
FreeBSD-src-5d1c9f88558c7b5da179af3e8681ba58f22591f2.tar.gz
Unbreak the support for 24-row terminals in the vmstat display. The
part that handled the 17th and 18th rows of the vmstat-proper subdisplay was deleted in rev.1.10 when these rows stopped being used and was not restored when the 17th row was used again. For such terminals, we now lose the `buf' field instead of making a mess with it. Terminals with fewer than 24 rows have never been supported. The problem is not avoided by using curses since we use the last line for data entry and don't use a separate subwindow for this line. Some other things in the vmstat display could be handled better using subwindows.
Diffstat (limited to 'usr.bin/systat')
-rw-r--r--usr.bin/systat/vmstat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c
index 15c7d5c..f2e2cf1 100644
--- a/usr.bin/systat/vmstat.c
+++ b/usr.bin/systat/vmstat.c
@@ -350,7 +350,8 @@ labelkre()
mvprintw(VMSTATROW + 13, VMSTATCOL + 9, "pdwak");
mvprintw(VMSTATROW + 14, VMSTATCOL + 9, "pdpgs");
mvprintw(VMSTATROW + 15, VMSTATCOL + 9, "intrn");
- mvprintw(VMSTATROW + 16, VMSTATCOL + 9, "buf");
+ if (LINES - 1 > VMSTATROW + 16)
+ mvprintw(VMSTATROW + 16, VMSTATCOL + 9, "buf");
mvprintw(GENSTATROW, GENSTATCOL, " Csw Trp Sys Int Sof Flt");
@@ -519,7 +520,8 @@ showkre()
PUTRATE(v_pdwakeups, VMSTATROW + 13, VMSTATCOL, 8);
PUTRATE(v_pdpages, VMSTATROW + 14, VMSTATCOL, 8);
PUTRATE(v_intrans, VMSTATROW + 15, VMSTATCOL, 8);
- putint(s.bufspace / 1024, VMSTATROW + 16, VMSTATCOL, 8);
+ if (LINES - 1 > VMSTATROW + 16)
+ putint(s.bufspace / 1024, VMSTATROW + 16, VMSTATCOL, 8);
PUTRATE(v_vnodein, PAGEROW + 2, PAGECOL + 6, 5);
PUTRATE(v_vnodeout, PAGEROW + 2, PAGECOL + 12, 5);
PUTRATE(v_swapin, PAGEROW + 2, PAGECOL + 19, 5);
OpenPOWER on IntegriCloud