From owner-svn-src-head@FreeBSD.ORG Sun Oct 26 20:48:27 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 722E3D5E; Sun, 26 Oct 2014 20:48:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5ECC93C7; Sun, 26 Oct 2014 20:48:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9QKmRvu010856; Sun, 26 Oct 2014 20:48:27 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9QKmRxr010855; Sun, 26 Oct 2014 20:48:27 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201410262048.s9QKmRxr010855@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sun, 26 Oct 2014 20:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273709 - head/usr.bin/vmstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2014 20:48:27 -0000 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"); }