From 5d1c9f88558c7b5da179af3e8681ba58f22591f2 Mon Sep 17 00:00:00 2001 From: bde Date: Mon, 1 May 2006 00:26:43 +0000 Subject: 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. --- usr.bin/systat/vmstat.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.bin') 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); -- cgit v1.1