diff options
author | jseger <jseger@FreeBSD.org> | 1998-10-14 08:05:44 +0800 |
---|---|---|
committer | jseger <jseger@FreeBSD.org> | 1998-10-14 08:05:44 +0800 |
commit | b121fd72fbaf7399fd81c86be0a7066a0cad2270 (patch) | |
tree | 8cf8eb698bddf6f4aa3e217616cd5df9863d082f /sysutils/xperfmon | |
parent | f57aff0ed709ed3e06ca981c64899184ffca1170 (diff) | |
download | freebsd-ports-gnome-b121fd72fbaf7399fd81c86be0a7066a0cad2270.tar.gz freebsd-ports-gnome-b121fd72fbaf7399fd81c86be0a7066a0cad2270.tar.zst freebsd-ports-gnome-b121fd72fbaf7399fd81c86be0a7066a0cad2270.zip |
Unbreak for current.
Submitted by: Gary Jennejohn <garyj@muc.de>
Diffstat (limited to 'sysutils/xperfmon')
-rw-r--r-- | sysutils/xperfmon/files/freebsd_system.c | 10 |
1 files changed, 8 insertions, 2 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 |