From: Sebastian Harl Date: Sat, 22 Nov 2008 17:39:00 +0000 (+0100) Subject: processes plugin: Do not silently ignore configuration errors. X-Git-Tag: collectd-4.6.0~133 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5b123e4666d053231bffa735b7940e28e59d9395;p=collectd.git processes plugin: Do not silently ignore configuration errors. --- diff --git a/src/processes.c b/src/processes.c index f229804d..3b219906 100644 --- a/src/processes.c +++ b/src/processes.c @@ -459,12 +459,18 @@ static int ps_config (const char *key, const char *value) int fields_num; new_val = strdup (value); - if (new_val == NULL) + if (new_val == NULL) { + ERROR ("processes plugin: strdup failed when processing " + "`ProcessMatch %s'.", value); return (1); + } + fields_num = strsplit (new_val, fields, STATIC_ARRAY_SIZE (fields)); if (fields_num != 2) { + ERROR ("processes plugin: `ProcessMatch' needs exactly " + "two string arguments."); sfree (new_val); return (1); } @@ -473,6 +479,8 @@ static int ps_config (const char *key, const char *value) } else { + ERROR ("processes plugin: The `%s' configuration option is not " + "understood and will be ignored.", key); return (-1); }