summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorJustin M. Seger <jseger@FreeBSD.org>1998-10-14 00:05:44 +0000
committerJustin M. Seger <jseger@FreeBSD.org>1998-10-14 00:05:44 +0000
commitc0accd93e78b2772b51679a495cf231c7e1dab76 (patch)
tree1a392679f0b3e5340f335f9d0315324a859c425b /sysutils
parentUnbreak. (diff)
Unbreak for current.
Submitted by: Gary Jennejohn <garyj@muc.de>
Notes
Notes: svn path=/head/; revision=13970
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xperfmon/files/freebsd_system.c10
-rw-r--r--sysutils/xperfmon3/files/freebsd_system.c10
2 files changed, 16 insertions, 4 deletions
diff --git a/sysutils/xperfmon/files/freebsd_system.c b/sysutils/xperfmon/files/freebsd_system.c
index f7ae3895727b..5857146a2a56 100644
--- a/sysutils/xperfmon/files/freebsd_system.c
+++ b/sysutils/xperfmon/files/freebsd_system.c
@@ -353,6 +353,9 @@ collect_stats()
off_t ifnetaddr;
register int i, tmp;
int mib[3], size;
+#if (__FreeBSD_version >= 300004)
+ struct vfsconf vfc;
+#endif
kread(X_CPTIME, s.time, sizeof(s.time));
#ifndef HAVE_DEVSTAT
@@ -449,8 +452,11 @@ collect_stats()
size = sizeof(nfsstats);
mib[0] = CTL_FS;
-#if (__FreeBSD_version >= 300003) /* ?? */
- mib[1] = MNT_EXPORTED;
+#if (__FreeBSD_version >= 300004)
+ if (getvfsbyname("nfs", &vfc) < 0)
+ /* no NFS in the kernel */
+ return;
+ mib[1] = vfc.vfc_typenum;
#else
mib[1] = MOUNT_NFS;
#endif
diff --git a/sysutils/xperfmon3/files/freebsd_system.c b/sysutils/xperfmon3/files/freebsd_system.c
index f7ae3895727b..5857146a2a56 100644
--- a/sysutils/xperfmon3/files/freebsd_system.c
+++ b/sysutils/xperfmon3/files/freebsd_system.c
@@ -353,6 +353,9 @@ collect_stats()
off_t ifnetaddr;
register int i, tmp;
int mib[3], size;
+#if (__FreeBSD_version >= 300004)
+ struct vfsconf vfc;
+#endif
kread(X_CPTIME, s.time, sizeof(s.time));
#ifndef HAVE_DEVSTAT
@@ -449,8 +452,11 @@ collect_stats()
size = sizeof(nfsstats);
mib[0] = CTL_FS;
-#if (__FreeBSD_version >= 300003) /* ?? */
- mib[1] = MNT_EXPORTED;
+#if (__FreeBSD_version >= 300004)
+ if (getvfsbyname("nfs", &vfc) < 0)
+ /* no NFS in the kernel */
+ return;
+ mib[1] = vfc.vfc_typenum;
#else
mib[1] = MOUNT_NFS;
#endif