]> git.pld-linux.org Git - packages/net-snmp.git/commitdiff
- error about /proc/partitions also only once auto/th/net-snmp-5_7_1-5
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 27 Dec 2011 14:37:34 +0000 (14:37 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    net-snmp-logging.patch -> 1.3

net-snmp-logging.patch

index 60d729683769e07d2377855d89574a7c99b0d221..d8ee8a37db59bec205b8d25ef4ebbdfa94c2af07 100644 (file)
@@ -53,3 +53,28 @@ diff -r -u net-snmp-5.4.1~dfsg/agent/mibgroup/ucd-snmp/vmstat_linux.c net-snmp-5
 +      first = 0;
  }
  
+--- net-snmp-5.7.1/./agent/mibgroup/ucd-snmp/diskio.c~ 2011-09-28 07:53:47.000000000 +0300
++++ net-snmp-5.7.1/./agent/mibgroup/ucd-snmp/diskio.c  2011-12-27 16:33:10.128099629 +0200
+@@ -979,7 +979,8 @@
+ {
+     FILE* parts;
+     time_t now;
+-    
++    static int first = 1;
++
+     now = time(NULL);
+     if (cache_time + CACHE_TIMEOUT > now) {
+         return 0;
+@@ -1024,7 +1025,11 @@
+       int rc;
+       parts = fopen("/proc/partitions", "r");
+       if (!parts) {
+-          snmp_log_perror("/proc/partitions");
++          if (first) {
++              // log error only once
++              snmp_log_perror("/proc/partitions");
++              first = 0;
++          }
+           return 1;
+       }
This page took 0.149831 seconds and 4 git commands to generate.