From 3bccedcdf8e313009b068e38f48d159bcba9c14b Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 30 Apr 2006 09:13:59 +0000 Subject: [PATCH] Don't redraw the disk names on every update. This was apparently done to handle changes to the set of disks selected, but it is unnecessary for that since the whole screen is redrawn when this set is changed. It was also buggy: - MAXDRIVES*6 = 42 was hard-coded as only 30 spaces in a string literal, the last 2 disk names were not cleared as intended - when the extended vmstats are active, clearing of even 30 columns overruns the ozfod value field by 3 columns. This was harmless because the field is much wider than necessary. --- usr.bin/systat/vmstat.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c index 2ca4e8a633b6..aa1b256b3e92 100644 --- a/usr.bin/systat/vmstat.c +++ b/usr.bin/systat/vmstat.c @@ -560,14 +560,8 @@ showkre() PUTRATE(v_intr, GENSTATROW + 1, GENSTATCOL + 15, 4); PUTRATE(v_soft, GENSTATROW + 1, GENSTATCOL + 20, 4); PUTRATE(v_vm_faults, GENSTATROW + 1, GENSTATCOL + 25, 4); - mvprintw(DISKROW, DISKCOL + 5, " "); for (i = 0, lc = 0; i < num_devices && lc < MAXDRIVES; i++) if (dev_select[i].selected) { - char tmpstr[80]; - sprintf(tmpstr, "%s%d", dev_select[i].device_name, - dev_select[i].unit_number); - mvprintw(DISKROW, DISKCOL + 5 + 6 * lc, - " %5.5s", tmpstr); switch(state) { case TIME: dinfo(i, ++lc, &cur, &last);