projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
plugin.c: Tell the user if a plugin could not be found.
[collectd.git]
/
src
/
plugin.c
diff --git
a/src/plugin.c
b/src/plugin.c
index
007d094
..
acf7620
100644
(file)
--- a/
src/plugin.c
+++ b/
src/plugin.c
@@
-133,6
+133,7
@@
static int plugin_load_file (char *file)
const char *error = lt_dlerror ();
ERROR ("lt_dlopen failed: %s", error);
const char *error = lt_dlerror ();
ERROR ("lt_dlopen failed: %s", error);
+ fprintf (stderr, "lt_dlopen failed: %s\n", error);
return (1);
}
return (1);
}
@@
-296,7
+297,7
@@
int plugin_load (const char *type)
{
DIR *dh;
const char *dir;
{
DIR *dh;
const char *dir;
- char filename[BUFSIZE];
+ char filename[BUFSIZE]
= ""
;
char typename[BUFSIZE];
int typename_len;
int ret;
char typename[BUFSIZE];
int typename_len;
int ret;
@@
-355,10
+356,17
@@
int plugin_load (const char *type)
ret = 0;
break;
}
ret = 0;
break;
}
+ else
+ {
+ fprintf (stderr, "Unable to load plugin %s.\n", type);
+ }
}
closedir (dh);
}
closedir (dh);
+ if (filename[0] == '\0')
+ fprintf (stderr, "Could not find plugin %s.\n", type);
+
return (ret);
}
return (ret);
}