From owner-svn-src-head@FreeBSD.ORG Wed May 4 13:20:44 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF457106566B; Wed, 4 May 2011 13:20:44 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE7938FC17; Wed, 4 May 2011 13:20:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p44DKiuU051173; Wed, 4 May 2011 13:20:44 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p44DKitH051171; Wed, 4 May 2011 13:20:44 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201105041320.p44DKitH051171@svn.freebsd.org> From: Rick Macklem Date: Wed, 4 May 2011 13:20:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221435 - head/usr.bin/nfsstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 04 May 2011 13:20:44 -0000 Author: rmacklem Date: Wed May 4 13:20:44 2011 New Revision: 221435 URL: http://svn.freebsd.org/changeset/base/221435 Log: Revert r221308, since it incorrectly zero'd both client and server stats when "-c" or "-s" was specified. Modified: head/usr.bin/nfsstat/nfsstat.c Modified: head/usr.bin/nfsstat/nfsstat.c ============================================================================== --- head/usr.bin/nfsstat/nfsstat.c Wed May 4 13:09:20 2011 (r221434) +++ head/usr.bin/nfsstat/nfsstat.c Wed May 4 13:20:44 2011 (r221435) @@ -85,7 +85,6 @@ static int zflag = 0; static int run_v4 = 0; static int printtitle = 1; static struct ext_nfsstats ext_nfsstats; -static int nfssvc_flag; void intpr(int, int); void printhdr(int, int); @@ -108,7 +107,6 @@ main(int argc, char **argv) char *memf, *nlistf; char errbuf[_POSIX2_LINE_MAX]; - nfssvc_flag = NFSSVC_GETSTATS; interval = 0; memf = nlistf = NULL; while ((ch = getopt(argc, argv, "cesWM:N:w:z")) != -1) @@ -137,7 +135,6 @@ main(int argc, char **argv) break; case 'z': zflag = 1; - nfssvc_flag |= NFSSVC_ZEROSTATS; break; case 'e': run_v4 = 1; @@ -164,7 +161,7 @@ main(int argc, char **argv) errx(1, "experimental client/server not loaded"); if (run_v4 != 0) { - if (nfssvc(nfssvc_flag, &ext_nfsstats) < 0) + if (nfssvc(NFSSVC_GETSTATS, &ext_nfsstats) < 0) err(1, "Can't get stats"); } else if (nlistf != NULL || memf != NULL) { deadkernel = 1; @@ -796,13 +793,13 @@ exp_sidewaysintpr(u_int interval, int cl int hdrcnt = 1; ext_nfsstatsp = &lastst; - if (nfssvc(nfssvc_flag, ext_nfsstatsp) < 0) + if (nfssvc(NFSSVC_GETSTATS, ext_nfsstatsp) < 0) err(1, "Can't get stats"); sleep(interval); for (;;) { ext_nfsstatsp = &nfsstats; - if (nfssvc(nfssvc_flag, ext_nfsstatsp) < 0) + if (nfssvc(NFSSVC_GETSTATS, ext_nfsstatsp) < 0) err(1, "Can't get stats"); if (--hdrcnt == 0) {