[collectd] Re: [PATCH] plugin sensors - small fix reading config, small documentation fix

Luboš Staněk lubek at users.sourceforge.net
Tue Nov 21 18:56:05 CET 2006


Hi Florian,
please use the rest of the patch.

Florian Forster napsal(a):
> Hi Lubos,
> 
> On Tue, Nov 21, 2006 at 12:20:25PM +0100, Lubo? Stan?k wrote:
>> @@ -201,17 +201,20 @@ static int sensors_config (char *key, ch
>> -				|| (strcasecmp (value, "On") == 0))
>> +				|| (strcasecmp (value, "On") == 0)
>> +				|| (strcasecmp (value, "1") == 0))
> 
> all plugins *must* support `true' and `false' (because that's how it's
> documented in the manpage). Since `on'/`off' and `yes'/`no' are used
> regularly, too, plugins *should* support that as well.
> 
> I think the choice of options is pretty big as it is and I don't want to
> introduce this in *all* plugins. Also, I don't want to have the option
> in only one plugin, so I think we're better of without it. If anyone has
> a good reason for this change please let me know :)
> 

I tried you... :)

The 'IgnoreSelected' comparison will be repeatedly coded by all plugins
using 'ignorelist'. Would not it be better to move the 'True/Yes/On'
decoding to the 'ignorelist' function?


Best regards,
Lubos



More information about the collectd mailing list