mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
Add a patch to show enterprises.ucdavis.dskTable.dskEntry.dskPercentNode
mibs on our system. Submitted by: Donal Diamond <donal.diamond@eircom.net>
This commit is contained in:
parent
91312b5dcd
commit
16770abd78
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=65204
@ -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/ \
|
||||
|
32
net-mgmt/net-snmp-devel/files/patch-disk.c
Normal file
32
net-mgmt/net-snmp-devel/files/patch-disk.c
Normal file
@ -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));
|
@ -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/ \
|
||||
|
32
net-mgmt/net-snmp/files/patch-disk.c
Normal file
32
net-mgmt/net-snmp/files/patch-disk.c
Normal file
@ -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));
|
@ -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/ \
|
||||
|
32
net-mgmt/net-snmp53/files/patch-disk.c
Normal file
32
net-mgmt/net-snmp53/files/patch-disk.c
Normal file
@ -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));
|
@ -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/ \
|
||||
|
32
net/net-snmp/files/patch-disk.c
Normal file
32
net/net-snmp/files/patch-disk.c
Normal file
@ -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));
|
Loading…
Reference in New Issue
Block a user