diff options
Diffstat (limited to 'x11/kdebase3/patches/patch-fi')
-rw-r--r-- | x11/kdebase3/patches/patch-fi | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/x11/kdebase3/patches/patch-fi b/x11/kdebase3/patches/patch-fi index 191bc560fe2..66aac6c5fa7 100644 --- a/x11/kdebase3/patches/patch-fi +++ b/x11/kdebase3/patches/patch-fi @@ -1,8 +1,16 @@ -$NetBSD: patch-fi,v 1.3 2006/10/08 07:49:27 markd Exp $ +$NetBSD: patch-fi,v 1.4 2008/01/04 21:05:58 markd Exp $ ---- ksysguard/ksysguardd/NetBSD/Memory.c.orig 2006-10-08 15:49:27.000000000 +1300 +--- ksysguard/ksysguardd/NetBSD/Memory.c.orig 2005-10-11 04:04:31.000000000 +1300 +++ ksysguard/ksysguardd/NetBSD/Memory.c -@@ -45,8 +45,11 @@ +@@ -21,7 +21,6 @@ + */ + + #include <fcntl.h> +-#include <kvm.h> + #include <limits.h> + #include <stdio.h> + #include <stdlib.h> +@@ -45,29 +44,25 @@ static size_t Total = 0; static size_t MFree = 0; static size_t Used = 0; @@ -16,7 +24,8 @@ $NetBSD: patch-fi,v 1.3 2006/10/08 07:49:27 markd Exp $ static size_t STotal = 0; static size_t SFree = 0; static size_t SUsed = 0; -@@ -55,19 +58,18 @@ static kvm_t *kd; +-static kvm_t *kd; + void initMemory(struct SensorModul* sm) { @@ -26,11 +35,9 @@ $NetBSD: patch-fi,v 1.3 2006/10/08 07:49:27 markd Exp $ - - if ((kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, buf)) == NULL) { - log_error("kvm_openfiles()"); -+ if ((kd = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, "kvm_open")) == NULL) { -+ log_error("kvm_open()"); - return; - } - +- return; +- } +- registerMonitor("mem/physical/free", "integer", printMFree, printMFreeInfo, sm); registerMonitor("mem/physical/used", "integer", printUsed, printUsedInfo, sm); - registerMonitor("mem/physical/buf", "integer", printBuffers, printBuffersInfo, sm); @@ -43,7 +50,15 @@ $NetBSD: patch-fi,v 1.3 2006/10/08 07:49:27 markd Exp $ registerMonitor("mem/swap/free", "integer", printSwapFree, printSwapFreeInfo, sm); registerMonitor("mem/swap/used", "integer", printSwapUsed, printSwapUsedInfo, sm); } -@@ -83,7 +85,6 @@ updateMemory(void) +@@ -75,7 +70,6 @@ initMemory(struct SensorModul* sm) + void + exitMemory(void) + { +- kvm_close(kd); + } + + int +@@ -83,7 +77,6 @@ updateMemory(void) { #define ARRLEN(X) (sizeof(X)/sizeof(X[0])) @@ -51,7 +66,7 @@ $NetBSD: patch-fi,v 1.3 2006/10/08 07:49:27 markd Exp $ size_t len; { -@@ -95,37 +96,26 @@ updateMemory(void) +@@ -95,37 +88,26 @@ updateMemory(void) } { @@ -101,7 +116,7 @@ $NetBSD: patch-fi,v 1.3 2006/10/08 07:49:27 markd Exp $ return 0; } -@@ -154,27 +144,63 @@ printUsedInfo(const char* cmd) +@@ -154,27 +136,63 @@ printUsedInfo(const char* cmd) } void |