[collectd] [PATCH] Linux ACPI thermal zone plugin

Michał Mirosław mirq-linux at rere.qmqm.pl
Sat Jun 14 02:26:41 CEST 2008


On Thu, Jun 12, 2008 at 10:39:46AM +0200, Florian Forster wrote:
> > And it would be useful to have some standard functions to use in
> > config callback like boolean entry parser
[cut]
> > or common ignorelist entry names/parser.
> Sorry, I don't know what you mean by that..?

I mean that it would be nice to have a function that parses all
ignorelist options (Device/IgnoreSelected/whatever new thing
for them is invented). It could be used in config callback like this:

static ignorelist_t *device_list;

static int plugin_config (const char *key, const char *value)
{
	int ret;

	ret = parse_ignorelist_options(&device_list, key, value);
	if (ret != -1)
		return ret;

	/* parse other options */
	return -1;
}

That would eliminate some code duplication in plugins that monitor
multiple devices.

Best regards,
Michał Mirosław



More information about the collectd mailing list