From a059273e4c2b6eef8d707d86b6f5a9dfb3e85430 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 22 Mar 2008 11:14:03 +0100 Subject: [PATCH] sensors plugin: Print information why a specific feature is ignored in debug mode. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit As requested by Ondřej Válek. --- src/sensors.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/sensors.c b/src/sensors.c index 1289d4b6..a96e04cc 100644 --- a/src/sensors.c +++ b/src/sensors.c @@ -341,16 +341,38 @@ static int sensors_load_conf (void) /* "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; + } /* 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) + { + DEBUG ("sensors plugin: sensors_load_conf: " + "Ignoring subfeature `%s', " + "because its type is " + "unknown.", + feature->name); continue; + } 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)) + { + DEBUG ("sensors plugin: sensors_load_conf: " + "Ignoring feature `%s', " + "because its type is not " + "supported.", feature->name); continue; + } while ((subfeature = sensors_get_all_subfeatures (chip, feature, &subfeature_num)) != NULL) -- 2.11.0