1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-15 23:50:44 +00:00
freebsd-ports/sysutils/xsysinfo/files/patch-ae

30 lines
685 B
Plaintext
Raw Normal View History

--- sysinfo.c.orig Tue Oct 6 16:21:18 1998
+++ sysinfo.c Tue Oct 13 09:47:49 1998
@@ -238,6 +238,9 @@
int pkt_in_out;
int total_xfers=0;
int mib[3], size;
+#if (__FreeBSD_version >= 300004)
+ struct vfsconf vfc;
+#endif
/* NPROCS=0, CPU */
if (cpuflag) {
@@ -361,10 +364,13 @@
#else
mib[0] = CTL_VFS;
#endif
-#if (__FreeBSD_version >= 300003) /* ?? */
- mib[1] = MNT_EXPORTED;
+#if (__FreeBSD_version >= 300004)
+ if (getvfsbyname("nfs", &vfc) < 0)
+ /* no NFS in the kernel */
+ goto nfs_out;
+ mib[1] = vfc.vfc_typenum;
#else
- mib[1] = MNT_NFS;
+ mib[1] = MOUNT_NFS;
#endif
mib[2] = NFS_NFSSTATS;
if (sysctl( mib, 3, &nfsstats, &size, NULL, 0) < 0)