All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH 0/6] Add support for multiple configuration
@ 2009-02-11 16:08 Jean Delvare
  0 siblings, 0 replies; only message in thread
From: Jean Delvare @ 2009-02-11 16:08 UTC (permalink / raw)
  To: lm-sensors

Hi all,

Here is an updated proposal to enable support for multiple configuration files
to libsensors. I have hopefully addressed all the constructive comments
I received about the first proposal [1]. Thanks Luca and Matt!

[1] http://lists.lm-sensors.org/pipermail/lm-sensors/2009-February/025274.html

 doc/libsensors-API.txt  |    4 +
 lib/access.c            |   17 +++--
 lib/conf-lex.l          |   22 ++++---
 lib/conf-parse.y        |   18 ++---
 lib/conf.h              |    1 
 lib/data.c              |   27 ++++++--
 lib/data.h              |   29 +++++++--
 lib/error.c             |   23 +++++++
 lib/error.h             |   21 +++++-
 lib/init.c              |  150 +++++++++++++++++++++++++++++++++++++++---------
 lib/libsensors.3        |   16 ++++-
 lib/scanner.h           |    2 
 lib/sensors.conf.5      |   20 +++++-
 lib/test/test-scanner.c |    2 
 14 files changed, 276 insertions(+), 76 deletions(-)

Important changes:
* Reloading the configuration files works again (patch 3/6).
* Error handling when configuration files can't be read has been
  improved. Errors are reported instead of being silently ignored
  patch 4/6).
* Error reporting now includes the file name (patches 5/6 and 6/6).
  This makes it much easier to locate and fix mistakes in configuration
  files.

This last point was implemented by extending the libsensors API with a
3rd error reporting function. I made it backwards compatible, that is,
an application which defined a custom function to handle parse errors
using the old API will still have it called. The new default parse error
handling function is only called if the old handling function is the
default one as well. So we should be on the safe side, even though this
was probably not needed: I couldn't find any monitoring application
actually defining a cutom parse error function.

The patches apply on top of SVN. I would welcome testing and further
comments. You can fetch a combined patch at:
  http://jdelvare.pck.nerim.net/sensors/libsensors-support-for-multiple-config-files.patch
if it makes testing easier for you.

Thanks,
-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-02-11 16:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-11 16:08 [lm-sensors] [PATCH 0/6] Add support for multiple configuration Jean Delvare

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.