From 12be45777aeea3999dece62ed2ad1fe5326f5a56 Mon Sep 17 00:00:00 2001 From: mckusick Date: Sun, 26 Oct 2014 20:48:26 +0000 Subject: Replace update from -r271410 accidentally lost in -r273575. --- usr.bin/vmstat/vmstat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.bin/vmstat') diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index 7465a93..760dce8 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -828,7 +828,7 @@ dovmstat(unsigned int interval, int reps) } static void -printhdr(int ncpus, u_long cpumask) +printhdr(int maxid, u_long cpumask) { int i, num_shown; @@ -844,7 +844,7 @@ printhdr(int ncpus, u_long cpumask) (void)printf(" disk"); (void)printf(" faults "); if (Pflag) { - for (i = 0; i < ncpus; i++) { + for (i = 0; i <= maxid; i++) { if (cpumask & (1ul << i)) printf(" cpu%d ", i); } @@ -864,7 +864,7 @@ printhdr(int ncpus, u_long cpumask) dev_select[i].unit_number); (void)printf(" in sy cs"); if (Pflag) { - for (i = 0; i < ncpus; i++) { + for (i = 0; i <= maxid; i++) { if (cpumask & (1ul << i)) printf(" us sy id"); } -- cgit v1.1