aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/net-snmp53
diff options
context:
space:
mode:
authorkuriyama <kuriyama@FreeBSD.org>2002-08-29 10:21:28 +0800
committerkuriyama <kuriyama@FreeBSD.org>2002-08-29 10:21:28 +0800
commitcb4b77ae207255c058deed179171be5ba9e0c231 (patch)
tree14b7de334ffeac6877f05750ecf299c67a4eca9a /net-mgmt/net-snmp53
parent36146e589fa3df615cf11bc06eacb7bc070c1ee7 (diff)
downloadfreebsd-ports-gnome-cb4b77ae207255c058deed179171be5ba9e0c231.tar.gz
freebsd-ports-gnome-cb4b77ae207255c058deed179171be5ba9e0c231.tar.zst
freebsd-ports-gnome-cb4b77ae207255c058deed179171be5ba9e0c231.zip
Add a patch to show enterprises.ucdavis.dskTable.dskEntry.dskPercentNode
mibs on our system. Submitted by: Donal Diamond <donal.diamond@eircom.net>
Diffstat (limited to 'net-mgmt/net-snmp53')
-rw-r--r--net-mgmt/net-snmp53/Makefile1
-rw-r--r--net-mgmt/net-snmp53/files/patch-disk.c32
2 files changed, 33 insertions, 0 deletions
diff --git a/net-mgmt/net-snmp53/Makefile b/net-mgmt/net-snmp53/Makefile
index 940b2eceb6c7..3591319a53cd 100644
--- a/net-mgmt/net-snmp53/Makefile
+++ b/net-mgmt/net-snmp53/Makefile
@@ -7,6 +7,7 @@
PORTNAME= net-snmp
PORTVERSION= 5.0.3
+PORTREVISION= 1
CATEGORIES= net ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
ftp://sunsite.cnlab-switch.ch/mirror/ucd-snmp/ \
diff --git a/net-mgmt/net-snmp53/files/patch-disk.c b/net-mgmt/net-snmp53/files/patch-disk.c
new file mode 100644
index 000000000000..ee6603a94e2a
--- /dev/null
+++ b/net-mgmt/net-snmp53/files/patch-disk.c
@@ -0,0 +1,32 @@
+--- agent/mibgroup/ucd-snmp/disk.c.orig Mon Jul 8 11:37:20 2002
++++ agent/mibgroup/ucd-snmp/disk.c Thu Aug 29 11:08:39 2002
+@@ -366,7 +366,7 @@
+ double totalblks, free, used, avail, availblks;
+ #else
+ static long avail;
+-#ifdef STRUCT_STATVFS_HAS_F_FILES
++#if defined(HAVE_UFS_FFS_FS_H) || defined(STRUCT_STATVFS_HAS_F_FILES)
+ int percent_inode;
+ #endif
+ #endif
+@@ -454,6 +454,11 @@
+ (double) (vfs.f_files -
+ (vfs.f_ffree - vfs.f_favail)) * 100.0 + 0.5);
+ #endif
++#if defined(HAVE_UFS_FFS_FS_H) && !defined(STRUCT_STATVFS_HAS_F_FILES)
++ percent_inode = vfs.f_files == 0 ? 100.0 :
++ (int) ((double) (vfs.f_files - vfs.f_ffree) /
++ (double) (vfs.f_files) * 100.0 + 0.5);
++#endif
+ switch (vp->magic) {
+ case DISKTOTAL:
+ long_ret = vfs.f_blocks * (vfs.f_bsize / 1024);
+@@ -475,7 +480,7 @@
+ case DISKPERCENT:
+ long_ret = percent;
+ return ((u_char *) (&long_ret));
+-#ifdef STRUCT_STATVFS_HAS_F_FILES
++#if defined(HAVE_UFS_FFS_FS_H) || defined(STRUCT_STATVFS_HAS_F_FILES)
+ case DISKPERCENTNODE:
+ long_ret = percent_inode;
+ return ((u_char *) (&long_ret));