/**
* collectd - src/sensors.c
- * Copyright (C) 2005-2007 Florian octo Forster
+ * Copyright (C) 2005-2008 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
}
else if (chip->bus == SENSORS_CHIP_NAME_BUS_DUMMY)
{
- snprintf (buf, buf_size, "%s-%s-%04x",
+ status = snprintf (buf, buf_size, "%s-%s-%04x",
chip->prefix,
chip->busname,
chip->addr);
}
else
{
- snprintf (buf, buf_size, "%s-i2c-%d-%02x",
+ status = snprintf (buf, buf_size, "%s-i2c-%d-%02x",
chip->prefix,
chip->bus,
chip->addr);
/* "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)
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)
type = "fanspeed";
else if (fl->feature->type
== SENSORS_FEATURE_TEMP)
- type = "input";
+ type = "temperature";
else
continue;