Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Oct 2014 20:48:27 +0000 (UTC)
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r273709 - head/usr.bin/vmstat
Message-ID:  <201410262048.s9QKmRxr010855@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mckusick
Date: Sun Oct 26 20:48:26 2014
New Revision: 273709
URL: https://svnweb.freebsd.org/changeset/base/273709

Log:
  Replace update from -r271410 accidentally lost in -r273575.

Modified:
  head/usr.bin/vmstat/vmstat.c

Modified: head/usr.bin/vmstat/vmstat.c
==============================================================================
--- head/usr.bin/vmstat/vmstat.c	Sun Oct 26 20:13:46 2014	(r273708)
+++ head/usr.bin/vmstat/vmstat.c	Sun Oct 26 20:48:26 2014	(r273709)
@@ -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");
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410262048.s9QKmRxr010855>