diff options
author | bde <bde@FreeBSD.org> | 1998-01-20 12:27:38 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-01-20 12:27:38 +0000 |
commit | 3028bab0aea636bf4104ce41e293e0f253229f49 (patch) | |
tree | f080ad4a89eeb58078fde6a6a8b4c473dc411453 /usr.bin/nfsstat | |
parent | d7c390eb8ad2554f6aecd10e19bce555e4d78a9d (diff) | |
download | FreeBSD-src-3028bab0aea636bf4104ce41e293e0f253229f49.zip FreeBSD-src-3028bab0aea636bf4104ce41e293e0f253229f49.tar.gz |
Merged from Lite2. This was mostly already done, mostly indirectly
via wollman's changes in rev.1.2 being adopted by Lite2 and the
nfsv3 changes in rev.1.3 being adopted by both FreeBSD and Lite2.
We were only missing lookup of the type number for nfs (MOUNT_NFS
doesn't exist in Lite2).
Diffstat (limited to 'usr.bin/nfsstat')
-rw-r--r-- | usr.bin/nfsstat/nfsstat.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/usr.bin/nfsstat/nfsstat.c b/usr.bin/nfsstat/nfsstat.c index a53991a..b5533fe 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"); } } |