From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 12:04:02 2015 Return-Path: Delivered-To: svn-src-all@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 850848A3; Fri, 24 Apr 2015 12:04:02 +0000 (UTC) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2082D10B6; Fri, 24 Apr 2015 12:04:02 +0000 (UTC) Received: by wiun10 with SMTP id n10so17608141wiu.1; Fri, 24 Apr 2015 05:04:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=xf69IgraeceZifT//y1ncAV5CPO2T+1celX9zUzBts4=; b=x0AgOKrpquUqwF0NcLfajQCO6erINGyX/LJWGKU01F6NVAhrFXDAUnCuEJ3gjXz9oW VvRLErX2G9hqlInZ8E+Ylrr0Ak8oCoX5k3duwDjLjmwj6ng7ROP9uu9vRSRRRNmiYa2+ K1LARAK5oTZ2hUgbgyAQJTqPTB5JAVLegfX6C40Lsqip9rdv8kJcoipR1khfxwGR6/vv 1/LWD/IXdYdwk5XLeeaJiEgCI01wrlCqRLsCg9cLRkW0UcHOvKEy6Z8g6HbiNeNEtFsA uyzccMqyLbbz8zkvdhZAZUeDUxyWKOrb39I3hEudMLFe1zZ42ZfC9AKimZ28ce9PSMl4 aLEw== X-Received: by 10.180.210.171 with SMTP id mv11mr3192726wic.61.1429877040626; Fri, 24 Apr 2015 05:04:00 -0700 (PDT) Received: from brick.home (adiw48.neoplus.adsl.tpnet.pl. [79.184.204.48]) by mx.google.com with ESMTPSA id kc4sm16620749wjc.2.2015.04.24.05.03.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Apr 2015 05:03:59 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Fri, 24 Apr 2015 14:03:57 +0200 From: Edward Tomasz Napierala To: Sergey Kandaurov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281922 - head/usr.bin/nfsstat Message-ID: <20150424120357.GA5210@brick.home> Mail-Followup-To: Sergey Kandaurov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201504240758.t3O7w0o1022549@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 12:04:02 -0000 On 0424T1431, Sergey Kandaurov wrote: > On 24 April 2015 at 10:58, Edward Tomasz Napierala wrote: > > Author: trasz > > Date: Fri Apr 24 07:57:59 2015 > > New Revision: 281922 > > URL: https://svnweb.freebsd.org/changeset/base/281922 > > > > Log: > > Make nfsstat(1) build with WARNS=6. > > > > Sponsored by: The FreeBSD Foundation > > > > Modified: > > head/usr.bin/nfsstat/Makefile > > head/usr.bin/nfsstat/nfsstat.c > > > > Modified: head/usr.bin/nfsstat/Makefile > > ============================================================================== > > --- head/usr.bin/nfsstat/Makefile Fri Apr 24 07:52:21 2015 (r281921) > > +++ head/usr.bin/nfsstat/Makefile Fri Apr 24 07:57:59 2015 (r281922) > > @@ -6,6 +6,4 @@ CFLAGS+=-DNFS > > > > LIBADD= kvm > > > > -WARNS?= 3 > > - > > .include > > > > Modified: head/usr.bin/nfsstat/nfsstat.c > > ============================================================================== > > --- head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:52:21 2015 (r281921) > > +++ head/usr.bin/nfsstat/nfsstat.c Fri Apr 24 07:57:59 2015 (r281922) > > @@ -70,15 +70,6 @@ static const char rcsid[] = > > #include > > #include > > > > -struct nlist nl[] = { > > -#define N_NFSSTAT 0 > > - { .n_name = "nfsstats" }, > > -#define N_NFSRVSTAT 1 > > - { .n_name = "nfsrvstats" }, > > - { .n_name = NULL }, > > -}; > > -kvm_t *kd; > > - > > static int widemode = 0; > > static int zflag = 0; > > static int printtitle = 1; > > > > Now that nfsstat no longer uses kvm to extract statistics, it could be > further trimmed. > - no longer link with kvm > - un-document -M/-N options but still kept (?) for backward compatibility > - cleanup from the previous sysctl/kvm usage. > > Index: Makefile > =================================================================== > --- Makefile (revision 281924) > +++ Makefile (working copy) > @@ -2,8 +2,5 @@ > # $FreeBSD$ > > PROG= nfsstat > -CFLAGS+=-DNFS > > -LIBADD= kvm > - > .include > Index: nfsstat.1 > =================================================================== > --- nfsstat.1 (revision 281924) > +++ nfsstat.1 (working copy) > @@ -39,8 +39,6 @@ > .Sh SYNOPSIS > .Nm > .Op Fl cemszW > -.Op Fl M Ar core > -.Op Fl N Ar system > .Op Fl w Ar wait > .Sh DESCRIPTION > The > @@ -60,19 +58,12 @@ > .It Fl e > Report the extra statistics collected by the NFS client and > server for NFSv4. > -.It Fl M > -Extract values associated with the name list from the specified core > -instead of the default > -.Pa /dev/kmem . > .It Fl m > Report the mount options for all new NFS client mounts. > This option overrides all others and > .Nm > will exit after completing the report. > This option is only supported by the new NFS client. > -.It Fl N > -Extract the name list from the specified system instead of the default > -.Pa /boot/kernel/kernel . > .It Fl s > Only display server side statistics. > .It Fl W > @@ -92,19 +83,11 @@ > .It Fl z > Reset statistics after displaying them. > .El > -.Sh FILES > -.Bl -tag -width ".Pa /boot/kernel/kernel" -compact > -.It Pa /boot/kernel/kernel > -default kernel namelist > -.It Pa /dev/kmem > -default memory file > -.El > .Sh SEE ALSO > .Xr fstat 1 , > .Xr netstat 1 , > .Xr ps 1 , > .Xr systat 1 , > -.Xr sysctl 3 , > .Xr iostat 8 , > .Xr nfsdumpstate 8 , > .Xr pstat 8 , > Index: nfsstat.c > =================================================================== > --- nfsstat.c (revision 281924) > +++ nfsstat.c (working copy) > @@ -48,26 +48,16 @@ > #include > #include > #include > -#include > #include > -#include > -#include > #include > > #include > > -#include > -#include > -#include > #include > -#include > -#include > -#include > #include > #include > #include > #include > -#include > #include > > static int widemode = 0; > @@ -93,18 +83,15 @@ > int clientOnly = -1; > int serverOnly = -1; > int ch; > - char *memf, *nlistf; > int mntlen, i; > char buf[1024]; > struct statfs *mntbuf; > struct nfscl_dumpmntopts dumpmntopts; > > interval = 0; > - memf = nlistf = NULL; > while ((ch = getopt(argc, argv, "cesWM:mN:w:z")) != -1) > switch(ch) { > case 'M': > - memf = optarg; > break; > case 'm': > /* Display mount options for NFS mount points. */ > @@ -128,7 +115,6 @@ > } > exit(0); > case 'N': > - nlistf = optarg; > break; > case 'W': > widemode = 1; > @@ -159,17 +145,6 @@ > argc -= optind; > argv += optind; > > -#define BACKWARD_COMPATIBILITY > -#ifdef BACKWARD_COMPATIBILITY > - if (*argv) { > - interval = atoi(*argv); > - if (*++argv) { > - nlistf = *argv; > - if (*++argv) > - memf = *argv; > - } > - } > -#endif Doesn't this chunk break usage like "nfsstat 1"?