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-5.7'
[collectd.git]
/
src
/
sensors.c
diff --git
a/src/sensors.c
b/src/sensors.c
index
8f1824d
..
2c09006
100644
(file)
--- a/
src/sensors.c
+++ b/
src/sensors.c
@@
-367,6
+367,9
@@
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) &&
+#if SENSORS_API_VERSION >= 0x402
+ (feature->type != SENSORS_FEATURE_CURR) &&
+#endif
(feature->type != SENSORS_FEATURE_POWER)) {
DEBUG("sensors plugin: sensors_load_conf: "
"Ignoring feature `%s', "
(feature->type != SENSORS_FEATURE_POWER)) {
DEBUG("sensors plugin: sensors_load_conf: "
"Ignoring feature `%s', "
@@
-383,6
+386,9
@@
static int sensors_load_conf(void) {
if ((subfeature->type != SENSORS_SUBFEATURE_IN_INPUT) &&
(subfeature->type != SENSORS_SUBFEATURE_FAN_INPUT) &&
(subfeature->type != SENSORS_SUBFEATURE_TEMP_INPUT) &&
if ((subfeature->type != SENSORS_SUBFEATURE_IN_INPUT) &&
(subfeature->type != SENSORS_SUBFEATURE_FAN_INPUT) &&
(subfeature->type != SENSORS_SUBFEATURE_TEMP_INPUT) &&
+#if SENSORS_API_VERSION >= 0x402
+ (subfeature->type != SENSORS_SUBFEATURE_CURR_INPUT) &&
+#endif
(subfeature->type != SENSORS_SUBFEATURE_POWER_INPUT))
continue;
(subfeature->type != SENSORS_SUBFEATURE_POWER_INPUT))
continue;
@@
-513,6
+519,10
@@
static int sensors_read(void) {
type = "temperature";
else if (fl->feature->type == SENSORS_FEATURE_POWER)
type = "power";
type = "temperature";
else if (fl->feature->type == SENSORS_FEATURE_POWER)
type = "power";
+#if SENSORS_API_VERSION >= 0x402
+ else if (fl->feature->type == SENSORS_FEATURE_CURR)
+ type = "current";
+#endif
else
continue;
else
continue;