summaryrefslogtreecommitdiff
path: root/usr.bin/nfsstat
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1998-01-20 12:27:38 +0000
committerBruce Evans <bde@FreeBSD.org>1998-01-20 12:27:38 +0000
commiteae79dd1c0778bd3b5330ef928801f77e55bc566 (patch)
tree58a2cef8aaaad3630b7ad2e9eae27628c33da7f9 /usr.bin/nfsstat
parent7bbe74ab5890aa77915a7e51e97673d9ce4309b1 (diff)
downloadsrc-test2-eae79dd1c0778bd3b5330ef928801f77e55bc566.tar.gz
src-test2-eae79dd1c0778bd3b5330ef928801f77e55bc566.zip
Notes
Diffstat (limited to 'usr.bin/nfsstat')
-rw-r--r--usr.bin/nfsstat/nfsstat.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/usr.bin/nfsstat/nfsstat.c b/usr.bin/nfsstat/nfsstat.c
index a53991a2a2f7..b5533fe957cf 100644
--- a/usr.bin/nfsstat/nfsstat.c
+++ b/usr.bin/nfsstat/nfsstat.c
@@ -41,9 +41,11 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
-/*static char sccsid[] = "From: @(#)nfsstat.c 8.1 (Berkeley) 6/6/93";*/
+#if 0
+static char sccsid[] = "@(#)nfsstat.c 8.2 (Berkeley) 3/31/95";
+#endif
static const char rcsid[] =
- "$Id: nfsstat.c,v 1.8 1997/02/22 19:56:25 peter Exp $";
+ "$Id: nfsstat.c,v 1.9 1997/03/29 04:31:23 imp Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -162,12 +164,14 @@ readstats(stp)
} else {
int name[3];
size_t buflen = sizeof *stp;
+ struct vfsconf vfc;
+ if (getvfsbyname("nfs", &vfc) < 0)
+ err(1, "getvfsbyname: NFS not compiled into kernel");
name[0] = CTL_VFS;
- name[1] = MOUNT_NFS;
+ name[1] = vfc.vfc_typenum;
name[2] = NFS_NFSSTATS;
-
- if(sysctl(name, 3, stp, &buflen, (void *)0, (size_t)0) < 0) {
+ if (sysctl(name, 3, stp, &buflen, (void *)0, (size_t)0) < 0) {
err(1, "sysctl");
}
}