summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/systat')
-rw-r--r--usr.bin/systat/devs.c2
-rw-r--r--usr.bin/systat/vmstat.c9
2 files changed, 5 insertions, 6 deletions
diff --git a/usr.bin/systat/devs.c b/usr.bin/systat/devs.c
index 309253e..d37cf2d 100644
--- a/usr.bin/systat/devs.c
+++ b/usr.bin/systat/devs.c
@@ -138,7 +138,7 @@ dsinit(int maxshowdevs, struct statinfo *s1, struct statinfo *s2 __unused,
if (devstat_selectdevs(&dev_select, &num_selected, &num_selections,
&select_generation, generation, s1->dinfo->devices, num_devices,
NULL, 0, NULL, 0, DS_SELECT_ADD, maxshowdevs, 0) == -1)
- errx(1, "%s", devstat_errbuf);
+ errx(1, "%d %s", __LINE__, devstat_errbuf);
return(1);
}
diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c
index 92a5e83..6a11f46 100644
--- a/usr.bin/systat/vmstat.c
+++ b/usr.bin/systat/vmstat.c
@@ -678,11 +678,10 @@ putint(n, l, lc, w)
return;
}
snprintf(b, sizeof(b), "%*d", w, n);
- if ((int)strlen(b) > w) {
- while (w-- > 0)
- addch('*');
- return;
- }
+ if ((int)strlen(b) > w)
+ snprintf(b, sizeof(b), "%*dK", w - 1, n / 1000);
+ if ((int)strlen(b) > w)
+ snprintf(b, sizeof(b), "%*dM", w - 1, n / 1000000);
addstr(b);
}
OpenPOWER on IntegriCloud