From: Marco van Tol Date: Tue, 23 Apr 2019 17:46:51 +0000 (+0200) Subject: Fix warnings when we're unable to poll X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=98d222fa30a0e771fe7ae075fada0924e3242155;p=collectd.git Fix warnings when we're unable to poll --- diff --git a/src/cpufreq.c b/src/cpufreq.c index 0f6cd32b..ee5492c5 100644 --- a/src/cpufreq.c +++ b/src/cpufreq.c @@ -109,8 +109,10 @@ static int cpufreq_init(void) { int cpufreq; size_t cf_len = sizeof(cpufreq); - if(sysctlbyname(mib, &cpufreq, &cf_len, NULL, 0) != 0) + if(sysctlbyname(mib, &cpufreq, &cf_len, NULL, 0) != 0) { + WARNING("cpufreq plugin: sysctl \"%s\" failed.", mib); plugin_unregister_read("cpufreq"); + } #endif return 0; @@ -232,7 +234,7 @@ static int cpufreq_read(void) { size_t cf_len = sizeof(cpufreq); if(sysctlbyname(mib, &cpufreq, &cf_len, NULL, 0) != 0) { - WARNING("cpufreq plugin: reading \"%s\" failed.", mib); + WARNING("cpufreq plugin: sysctl \"%s\" failed.", mib); return 0; }