Code

patches: Removed battery_acpi_complain.dpatch.
authorSebastian Harl <sh@tokkee.org>
Tue, 2 Jun 2009 19:06:40 +0000 (21:06 +0200)
committerSebastian Harl <sh@tokkee.org>
Tue, 2 Jun 2009 19:06:40 +0000 (21:06 +0200)
This patch has been included upstream.

debian/changelog
debian/patches/00list
debian/patches/battery_acpi_complain.dpatch [deleted file]

index 783c344bc98572f75cb6b567c9d2a94ba033f6c5..6a4327bcb3c9fa4418eb24a0bf4d25803c8d1d7d 100644 (file)
@@ -1,10 +1,12 @@
 collectd (4.6.3-1) unstable; urgency=low
 
   * New upstream release.
+  * debian/patches:
+    - Removed battery_acpi_complain.dpatch - included upstream.
   * debian/rules:
     - Install collectd-network.py to /usr/share/doc/collectd/examples/.
 
- -- Sebastian Harl <tokkee@debian.org>  Tue, 02 Jun 2009 20:24:43 +0200
+ -- Sebastian Harl <tokkee@debian.org>  Tue, 02 Jun 2009 21:06:02 +0200
 
 collectd (4.6.2-3) unstable; urgency=low
 
index 8a227ab8b9050a54c1139eb04d860fbb073205d9..14eaad54e1ad8fc44fe1280b2e07beb5ad906393 100644 (file)
@@ -1,6 +1,5 @@
 rrd_filter_path.dpatch
 collection_conf_path.dpatch
-battery_acpi_complain.dpatch
 ntpd_type_pun_fix.dpatch
 include_empty_files.dpatch
 rrdtool_uninitialized_fix.dpatch
diff --git a/debian/patches/battery_acpi_complain.dpatch b/debian/patches/battery_acpi_complain.dpatch
deleted file mode 100755 (executable)
index 7ed6042..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## battery_acpi_complain.dpatch by Sebastian Harl <sh@tokkee.org>
-##
-## DP: battery plugin: Don't complain about missing /proc/acpi/battery each
-## DP: interval. Instead, complain once when the read callback is called for
-## DP: the first time.
-
-@DPATCH@
-
-diff a/src/battery.c b/src/battery.c
---- a/src/battery.c
-+++ b/src/battery.c
-@@ -23,6 +23,8 @@
- #include "common.h"
- #include "plugin.h"
-+#include "utils_complain.h"
-+
- #if HAVE_MACH_MACH_TYPES_H
- #  include <mach/mach_types.h>
- #endif
-@@ -436,6 +438,8 @@ static int battery_read (void)
- /* #endif HAVE_IOKIT_IOKITLIB_H || HAVE_IOKIT_PS_IOPOWERSOURCES_H */
- #elif KERNEL_LINUX
-+      static c_complain_t acpi_dir_complaint = C_COMPLAIN_INIT_STATIC;
-+
-       FILE *fh;
-       char buffer[1024];
-       char filename[256];
-@@ -506,8 +510,17 @@ static int battery_read (void)
-                       battery_submit ("0", "voltage", voltage);
-       }
--      walk_directory (battery_acpi_dir, battery_read_acpi,
--                      /* user_data = */ NULL);
-+      if (0 == access (battery_acpi_dir, R_OK))
-+              walk_directory (battery_acpi_dir, battery_read_acpi,
-+                              /* user_data = */ NULL);
-+      else
-+      {
-+              char errbuf[1024];
-+              c_complain_once (LOG_WARNING, &acpi_dir_complaint,
-+                              "battery plugin: Failed to access `%s': %s",
-+                              battery_acpi_dir,
-+                              sstrerror (errno, errbuf, sizeof (errbuf)));
-+      }
- #endif /* KERNEL_LINUX */