projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-4.3' into collectd-4.4
[collectd.git]
/
src
/
sensors.c
diff --git
a/src/sensors.c
b/src/sensors.c
index
1289d4b
..
0968e31
100644
(file)
--- a/
src/sensors.c
+++ b/
src/sensors.c
@@
-1,6
+1,6
@@
/**
* collectd - src/sensors.c
/**
* collectd - src/sensors.c
- * Copyright (C) 2005-200
7
Florian octo Forster
+ * Copyright (C) 2005-200
8
Florian octo Forster
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@
-189,14
+189,14
@@
static int sensors_snprintf_chip_name (char *buf, size_t buf_size,
}
else if (chip->bus == SENSORS_CHIP_NAME_BUS_DUMMY)
{
}
else if (chip->bus == SENSORS_CHIP_NAME_BUS_DUMMY)
{
- snprintf (buf, buf_size, "%s-%s-%04x",
+ s
tatus = s
nprintf (buf, buf_size, "%s-%s-%04x",
chip->prefix,
chip->busname,
chip->addr);
}
else
{
chip->prefix,
chip->busname,
chip->addr);
}
else
{
- snprintf (buf, buf_size, "%s-i2c-%d-%02x",
+ s
tatus = s
nprintf (buf, buf_size, "%s-i2c-%d-%02x",
chip->prefix,
chip->bus,
chip->addr);
chip->prefix,
chip->bus,
chip->addr);
@@
-341,16
+341,38
@@
static int sensors_load_conf (void)
/* "master features" only */
if (feature->mapping != SENSORS_NO_MAPPING)
/* "master features" only */
if (feature->mapping != SENSORS_NO_MAPPING)
+ {
+ DEBUG ("sensors plugin: sensors_load_conf: "
+ "Ignoring subfeature `%s', "
+ "because (feature->mapping "
+ "!= SENSORS_NO_MAPPING).",
+ feature->name);
continue;
continue;
+ }
/* skip ignored in sensors.conf */
if (sensors_get_ignored (*chip, feature->number) == 0)
/* skip ignored in sensors.conf */
if (sensors_get_ignored (*chip, feature->number) == 0)
- break;
+ {
+ DEBUG ("sensors plugin: sensors_load_conf: "
+ "Ignoring subfeature `%s', "
+ "because "
+ "`sensors_get_ignored' told "
+ "me so.",
+ feature->name);
+ continue;
+ }
feature_type = sensors_feature_name_to_type (
feature->name);
if (feature_type == SENSOR_TYPE_UNKNOWN)
feature_type = sensors_feature_name_to_type (
feature->name);
if (feature_type == SENSOR_TYPE_UNKNOWN)
+ {
+ DEBUG ("sensors plugin: sensors_load_conf: "
+ "Ignoring subfeature `%s', "
+ "because its type is "
+ "unknown.",
+ feature->name);
continue;
continue;
+ }
fl = (featurelist_t *) malloc (sizeof (featurelist_t));
if (fl == NULL)
fl = (featurelist_t *) malloc (sizeof (featurelist_t));
if (fl == NULL)
@@
-389,7
+411,13
@@
static int sensors_load_conf (void)
if ((feature->type != SENSORS_FEATURE_IN)
&& (feature->type != SENSORS_FEATURE_FAN)
&& (feature->type != SENSORS_FEATURE_TEMP))
if ((feature->type != SENSORS_FEATURE_IN)
&& (feature->type != SENSORS_FEATURE_FAN)
&& (feature->type != SENSORS_FEATURE_TEMP))
+ {
+ DEBUG ("sensors plugin: sensors_load_conf: "
+ "Ignoring feature `%s', "
+ "because its type is not "
+ "supported.", feature->name);
continue;
continue;
+ }
while ((subfeature = sensors_get_all_subfeatures (chip,
feature, &subfeature_num)) != NULL)
while ((subfeature = sensors_get_all_subfeatures (chip,
feature, &subfeature_num)) != NULL)
@@
-552,7
+580,7
@@
static int sensors_read (void)
type = "fanspeed";
else if (fl->feature->type
== SENSORS_FEATURE_TEMP)
type = "fanspeed";
else if (fl->feature->type
== SENSORS_FEATURE_TEMP)
- type = "
input
";
+ type = "
temperature
";
else
continue;
else
continue;