aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/net-snmp-devel/files
diff options
context:
space:
mode:
authorJun Kuriyama <kuriyama@FreeBSD.org>2008-08-10 14:48:06 +0000
committerJun Kuriyama <kuriyama@FreeBSD.org>2008-08-10 14:48:06 +0000
commit21695c6079afb117684c4e107fa9ea4e3316d036 (patch)
tree58c8225168e8d31c72a2c4341ae897c863eede8f /net-mgmt/net-snmp-devel/files
parentb6d56128a9ba548ae328f77cc972e541d59a6a42 (diff)
o Make dir /var/agentx for AgnetX sockets [1].
o Include zfs mount points for disk reports. Reported by: bms [1]
Notes
Notes: svn path=/head/; revision=218335
Diffstat (limited to 'net-mgmt/net-snmp-devel/files')
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-disk.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/net-mgmt/net-snmp-devel/files/patch-disk.c b/net-mgmt/net-snmp-devel/files/patch-disk.c
new file mode 100644
index 000000000000..d58269d1e08d
--- /dev/null
+++ b/net-mgmt/net-snmp-devel/files/patch-disk.c
@@ -0,0 +1,31 @@
+--- agent/mibgroup/ucd-snmp/disk.c.orig 2008-07-05 22:11:22.366362753 +0900
++++ agent/mibgroup/ucd-snmp/disk.c 2008-07-06 00:32:19.611196878 +0900
+@@ -73,6 +73,9 @@
+ #if HAVE_SYS_VFS_H
+ #include <sys/vfs.h>
+ #endif
++#if defined(__FreeBSD__) && __FreeBSD_version >= 700055
++#include <sys/ucred.h>
++#endif
+ #if defined(HAVE_STATFS)
+ #if HAVE_SYS_MOUNT_H
+ #include <sys/mount.h>
+@@ -491,6 +494,18 @@
+ dummy = 1;
+ }
+ endfsent(); /* close /etc/fstab */
++#if defined(__FreeBSD__) && __FreeBSD_version >= 700055
++ {
++ struct statfs *mntbuf;
++ size_t i, mntsize;
++ mntsize = getmntinfo(&mntbuf, MNT_NOWAIT);
++ for (i = 0; i < mntsize; i++) {
++ if (strncmp(mntbuf[i].f_fstypename, "zfs", 3) == 0) {
++ add_device(mntbuf[i].f_mntonname, mntbuf[i].f_mntfromname, -1, minpercent, 0);
++ }
++ }
++ }
++#endif
+ if(dummy != 0) {
+ /*
+ * dummy clause for else below