From: Sebastian Harl Date: Mon, 31 Mar 2008 08:46:42 +0000 (+0200) Subject: plugin.c: Tell the user if a plugin could not be found. X-Git-Tag: collectd-4.2.7~15 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=20d7c9833c8c11d4a1039b5bf0eab4ad8e8f5281;p=collectd.git plugin.c: Tell the user if a plugin could not be found. Up to now this error was silently ignored, letting the user believe that everything went fine. Signed-off-by: Sebastian Harl Signed-off-by: Florian Forster --- diff --git a/src/plugin.c b/src/plugin.c index 23ea9017..acf7620e 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -297,7 +297,7 @@ int plugin_load (const char *type) { DIR *dh; const char *dir; - char filename[BUFSIZE]; + char filename[BUFSIZE] = ""; char typename[BUFSIZE]; int typename_len; int ret; @@ -364,6 +364,9 @@ int plugin_load (const char *type) closedir (dh); + if (filename[0] == '\0') + fprintf (stderr, "Could not find plugin %s.\n", type); + return (ret); }