From: Sebastian Harl Date: Sun, 10 May 2009 15:11:57 +0000 (+0200) Subject: patches: Removed battery_acpi_complain.dpatch and ntpd_type_pun_fix.dpatch. X-Git-Tag: collectd-4.7.2-1~38^2^2^2~10 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2ae4959344ecdd1673168a6d9078fad127c41165;p=pkg-collectd.git patches: Removed battery_acpi_complain.dpatch and ntpd_type_pun_fix.dpatch. Those patches have been included upstream. --- diff --git a/debian/changelog b/debian/changelog index 7c76830..64e9423 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,8 +14,11 @@ collectd (4.7.0-1) unstable; urgency=low * debian/rules: - Install collectd-{network,unixsock}.py to /usr/share/doc/collectd/ examples/. + * debian/patches: + - Removed battery_acpi_complain.dpatch - included upstream. + - Removed ntpd_type_pun_fix.dpatch - included upstream. - -- Sebastian Harl Sun, 10 May 2009 13:12:16 +0200 + -- Sebastian Harl Sun, 10 May 2009 17:10:55 +0200 collectd (4.6.2-2) unstable; urgency=low diff --git a/debian/patches/00list b/debian/patches/00list index 63040b3..332b35c 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -1,5 +1,3 @@ rrd_filter_path.dpatch collection_conf_path.dpatch -battery_acpi_complain.dpatch -ntpd_type_pun_fix.dpatch diff --git a/debian/patches/battery_acpi_complain.dpatch b/debian/patches/battery_acpi_complain.dpatch deleted file mode 100755 index 7ed6042..0000000 --- a/debian/patches/battery_acpi_complain.dpatch +++ /dev/null @@ -1,50 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## battery_acpi_complain.dpatch by Sebastian Harl -## -## 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 - #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 */ - diff --git a/debian/patches/ntpd_type_pun_fix.dpatch b/debian/patches/ntpd_type_pun_fix.dpatch deleted file mode 100644 index db185cf..0000000 --- a/debian/patches/ntpd_type_pun_fix.dpatch +++ /dev/null @@ -1,56 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## ntpd_type_pun_fix.dpatch by Florian Forster -## -## DP: ntpd plugin: Fix dereference of type-punned pointer. - -@DPATCH@ - -diff a/src/ntpd.c b/src/ntpd.c ---- a/src/ntpd.c -+++ b/src/ntpd.c -@@ -896,25 +896,33 @@ static int ntpd_read (void) - - if (ptr->v6_flag) - { -- struct sockaddr_in6 *sa_ptr; -- sa_ptr = (struct sockaddr_in6 *) &sa; -+ struct sockaddr_in6 sa6; - -- sa_ptr->sin6_family = AF_INET6; -- sa_ptr->sin6_port = htons (123); -- memcpy (&sa_ptr->sin6_addr, &ptr->srcadr6, -+ assert (sizeof (sa) >= sizeof (sa6)); -+ -+ memset (&sa6, 0, sizeof (sa6)); -+ sa6.sin6_family = AF_INET6; -+ sa6.sin6_port = htons (123); -+ memcpy (&sa6.sin6_addr, &ptr->srcadr6, - sizeof (struct in6_addr)); -- sa_len = sizeof (struct sockaddr_in6); -+ sa_len = sizeof (sa6); -+ -+ memcpy (&sa, &sa6, sizeof (sa6)); - } - else - { -- struct sockaddr_in *sa_ptr; -- sa_ptr = (struct sockaddr_in *) &sa; -+ struct sockaddr_in sa4; - -- sa_ptr->sin_family = AF_INET; -- sa_ptr->sin_port = htons (123); -- memcpy (&sa_ptr->sin_addr, &ptr->srcadr, -+ assert (sizeof (sa) >= sizeof (sa4)); -+ -+ memset (&sa4, 0, sizeof (sa4)); -+ sa4.sin_family = AF_INET; -+ sa4.sin_port = htons (123); -+ memcpy (&sa4.sin_addr, &ptr->srcadr, - sizeof (struct in_addr)); -- sa_len = sizeof (struct sockaddr_in); -+ sa_len = sizeof (sa4); -+ -+ memcpy (&sa, &sa4, sizeof (sa4)); - } - - if (do_reverse_lookups == 0)