[collectd] [PATCH] Initialize libsensors with NULL as parameter

Florian Forster octo at verplant.org
Thu Feb 25 23:41:19 CET 2010


Hi Michael,

On Tue, Feb 09, 2010 at 05:30:16PM +0100, Michael Stapelberg wrote:
> The attached patch uses NULL for sensors_init. The downside of this is
> that the mechanism to reload the configuration file cannot be used any
> longer.

I'm a bit concerned about backwards compatibility here: Previously,
packagers were able to override the default config file by defining
SENSORS_CONF_PATH themselves.

The then missing mtime check is another point, but probably as norrow-
minded as the first one. Nonetheless, I'd like to propose the following
change:

  * If the libsensors version is right, define SENSORS_CONF_PATH to NULL
    if it is not already defined.

  * Put "if (conffile != NULL) { ... }" around the code doing the
    stat(2).

I think this would use the best of both choices: Usage of the standard
config files if the version is right (and nothing else was specified)
and mtime checking and reloading if something was specified explicitely
or when the library is too old.

What do you think?

Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20100225/bf8232ea/attachment.pgp 


More information about the collectd mailing list