From owner-svn-src-all@FreeBSD.ORG Fri Apr 24 11:31:33 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 94696D10; Fri, 24 Apr 2015 11:31:33 +0000 (UTC) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (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 2D0A11D58; Fri, 24 Apr 2015 11:31:33 +0000 (UTC) Received: by wizk4 with SMTP id k4so18288786wiz.1; Fri, 24 Apr 2015 04:31:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Ni1webI4ABYWa3kPYPGfPsia0aKYXRtKoF990Lsv40E=; b=brIlbzlKu7ZJQlODftabi9uWVxcqu51pSZcG3S8REN58huPjZj6P9Zjafpb8vptwzT dg2+ukq8Hixxfic9/yKqoFFjHAbcuhbXbDz7sk/019khrVSOZ2zZHLly39d2woueVSt1 w1PWd1ZuDtJxgIMDZDCIZtrwcR50BrB3IKCmj2mHDBJOKPr0/h8QKkPSffhkiQAxmwbg 5gmTWhCu2D/ZUjHFCjmkF3LG2sYLM4d/ieZLYOxMjoDi428+bslV/cErD2zJaPCaFHSY C8stzox+4TuWlVSYp/+306aPVYLaIkA3ZCnxz4cZP1u+XMcuB69t5wVyGMJiVByG7X/c nk8Q== MIME-Version: 1.0 X-Received: by 10.194.236.33 with SMTP id ur1mr14625798wjc.77.1429875091637; Fri, 24 Apr 2015 04:31:31 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.27.80.202 with HTTP; Fri, 24 Apr 2015 04:31:31 -0700 (PDT) In-Reply-To: <201504240758.t3O7w0o1022549@svn.freebsd.org> References: <201504240758.t3O7w0o1022549@svn.freebsd.org> Date: Fri, 24 Apr 2015 14:31:31 +0300 X-Google-Sender-Auth: TnvLsQy4VZ460KRhU9FYllQ1cx4 Message-ID: Subject: Re: svn commit: r281922 - head/usr.bin/nfsstat From: Sergey Kandaurov To: Edward Tomasz Napierala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 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 11:31:33 -0000 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 if (modfind("nfscommon") < 0) errx(1, "NFS client/server not loaded"); -- wbr, pluknet