summaryrefslogtreecommitdiff
path: root/net/net-snmp/patches/patch-am
diff options
context:
space:
mode:
Diffstat (limited to 'net/net-snmp/patches/patch-am')
-rw-r--r--net/net-snmp/patches/patch-am69
1 files changed, 63 insertions, 6 deletions
diff --git a/net/net-snmp/patches/patch-am b/net/net-snmp/patches/patch-am
index 100642032a6..2167a5da31f 100644
--- a/net/net-snmp/patches/patch-am
+++ b/net/net-snmp/patches/patch-am
@@ -1,8 +1,33 @@
-$NetBSD: patch-am,v 1.6 2007/02/05 12:06:16 adam Exp $
-
---- agent/mibgroup/host/hr_swrun.c.orig 2006-10-17 16:26:21.000000000 +0200
-+++ agent/mibgroup/host/hr_swrun.c
-@@ -926,6 +926,8 @@ var_hrswrun(struct variable * vp,
+--- agent/mibgroup/host/hr_swrun.c.orig 2007-04-02 16:51:34 +0300
++++ agent/mibgroup/host/hr_swrun.c 2007-09-12 21:41:48 +0300
+@@ -599,6 +599,8 @@
+ #elif HAVE_KVM_GETPROCS
+ #if defined(freebsd5) && __FreeBSD_version >= 500014
+ strcpy(string, proc_table[LowProcIndex].ki_comm);
++ #elif defined(dragonfly) && __DragonFly_version >= 190000
++ strcpy(string, proc_table[LowProcIndex].kp_comm);
+ #else
+ strcpy(string, proc_table[LowProcIndex].kp_proc.p_comm);
+ #endif
+@@ -722,6 +724,8 @@
+ #elif HAVE_KVM_GETPROCS
+ #if defined(freebsd5) && __FreeBSD_version >= 500014
+ strcpy(string, proc_table[LowProcIndex].ki_comm);
++ #elif defined(dragonfly) && __DragonFly_version >= 190000
++ strcpy(string, proc_table[LowProcIndex].kp_comm);
+ #else
+ strcpy(string, proc_table[LowProcIndex].kp_proc.p_comm);
+ #endif
+@@ -921,11 +925,17 @@
+ } else
+ long_return = 4; /* application */
+ #else
++ #if defined(dragonfly) && __DragonFly_version >= 190000
++ if (proc_table[LowProcIndex].kp_flags & P_SYSTEM)
++ #else
+ if (proc_table[LowProcIndex].kp_proc.p_flag & P_SYSTEM)
++ #endif
+ long_return = 2; /* operatingSystem */
else
long_return = 4; /* application */
#endif
@@ -11,10 +36,23 @@ $NetBSD: patch-am,v 1.6 2007/02/05 12:06:16 adam Exp $
#else
long_return = 4; /* application */
#endif
-@@ -1069,6 +1071,10 @@ var_hrswrun(struct variable * vp,
+@@ -962,6 +972,8 @@
+ #if HAVE_KVM_GETPROCS
+ #if defined(freebsd5) && __FreeBSD_version >= 500014
+ switch (proc_table[LowProcIndex].ki_stat) {
++ #elif defined(dragonfly) && __DragonFly_version >= 190000
++ switch (proc_table[LowProcIndex].kp_stat) {
+ #else
+ switch (proc_table[LowProcIndex].kp_proc.p_stat) {
+ #endif
+@@ -1069,6 +1081,14 @@
long_return = 0;
#elif defined(freebsd5)
long_return = proc_table[LowProcIndex].ki_runtime / 100000;
++ #elif defined(dragonfly) && __DragonFly_version >= 190000
++ long_return = proc_table[LowProcIndex].kp_lwp.kl_uticks +
++ proc_table[LowProcIndex].kp_lwp.kl_sticks +
++ proc_table[LowProcIndex].kp_lwp.kl_iticks;
+ #elif defined(dragonfly)
+ long_return = proc_table[LowProcIndex].kp_eproc.e_uticks +
+ proc_table[LowProcIndex].kp_eproc.e_sticks +
@@ -22,3 +60,22 @@ $NetBSD: patch-am,v 1.6 2007/02/05 12:06:16 adam Exp $
#else
long_return = proc_table[LowProcIndex].kp_proc.p_uticks +
proc_table[LowProcIndex].kp_proc.p_sticks +
+@@ -1157,6 +1177,8 @@
+ long_return =
+ #if defined(freebsd5)
+ proc_table[LowProcIndex].ki_size / 1024;
++ #elif defined(dragonfly) && __DragonFly_version >= 190000
++ proc_table[LowProcIndex].kp_vm_map_size / 1024;
+ #else
+ proc_table[LowProcIndex].kp_eproc.e_vm.vm_map.size / 1024;
+ #endif
+@@ -1477,6 +1499,9 @@
+ #if defined(freebsd5) && __FreeBSD_version >= 500014
+ if (proc_table[current_proc_entry].ki_stat != 0)
+ return proc_table[current_proc_entry++].ki_pid;
++ #elif defined(dragonfly) && __DragonFly_version >= 190000
++ if (proc_table[current_proc_entry].kp_stat != 0)
++ return proc_table[current_proc_entry++].kp_pid;
+ #else
+ if (proc_table[current_proc_entry].kp_proc.p_stat != 0)
+ return proc_table[current_proc_entry++].kp_proc.p_pid;