[collectd] [PATCH] Linux ACPI thermal zone plugin
Sebastian Harl
sh at tokkee.org
Thu Jun 12 12:39:50 CEST 2008
Hi,
On Thu, Jun 12, 2008 at 10:39:46AM +0200, Florian Forster wrote:
> On Wed, Jun 11, 2008 at 11:38:14PM +0200, Micha?? Miros??aw wrote:
> > And it would be useful to have some standard functions to use in
> > config callback like boolean entry parser
>
> That could be implemented as a macro in common.h:
> #define OPT_IS_TRUE(str) ((strcasecmp ((str), "true") == 0) \
> || (strcasecmp ((str), "yes") == 0) \
> || (strcasecmp ((str), "on") == 0))
> #define OPT_IS_FALSE(str) ((strcasecmp ((str), "false") == 0) \
> || (strcasecmp ((str), "no") == 0) \
> || (strcasecmp ((str), "off") == 0))
By now, all of that should be handled by liboconfig and configfile.c if
I did not miss anything - so checking for "true" or "false" only should
be all that has to be done.
Cheers,
Sebastian
--
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/
Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin
-------------- 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/20080612/0365e866/attachment.pgp
More information about the collectd
mailing list