From: octo Date: Wed, 14 Dec 2005 14:26:14 +0000 (+0000) Subject: Changed error messages for calls to `mkdir': Report creation of which directory failed X-Git-Tag: collectd-3.5.0~7^2~5 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=dd7eb19ac13a5eb4e39894a0d613067a70f194a0;p=collectd.git Changed error messages for calls to `mkdir': Report creation of which directory failed Fixed small but in the call to `plugin_load': We need the `value', not the `key'.. --- diff --git a/src/collectd.c b/src/collectd.c index 348623c0..ca7edb54 100644 --- a/src/collectd.c +++ b/src/collectd.c @@ -70,12 +70,12 @@ int change_basedir (char *dir) { if (mkdir (dir, 0755) == -1) { - syslog (LOG_ERR, "mkdir: %s", strerror (errno)); + syslog (LOG_ERR, "mkdir (%s): %s", dir, strerror (errno)); return (-1); } else if (chdir (dir) == -1) { - syslog (LOG_ERR, "chdir: %s", strerror (errno)); + syslog (LOG_ERR, "chdir (%s): %s", dir, strerror (errno)); return (-1); } } diff --git a/src/common.c b/src/common.c index d946cfb4..1eec286a 100644 --- a/src/common.c +++ b/src/common.c @@ -105,13 +105,13 @@ int check_create_dir (char *dir) { if (mkdir (dir, 0755) == -1) { - syslog (LOG_ERR, "mkdir %s: %s", dir, strerror (errno)); + syslog (LOG_ERR, "mkdir (%s): %s", dir, strerror (errno)); return (-1); } } else { - syslog (LOG_ERR, "stat %s: %s", dir, strerror (errno)); + syslog (LOG_ERR, "stat (%s): %s", dir, strerror (errno)); return (-1); } } diff --git a/src/configfile.c b/src/configfile.c index 0d1569f9..5cdd7360 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -321,7 +321,7 @@ int cf_callback_loadmodule (const char *shortvar, const char *var, return (LC_CBRET_ERROR); } - if (plugin_load (shortvar)) + if (plugin_load (value)) syslog (LOG_ERR, "plugin_load (%s): failed to load plugin", shortvar); /* Return `okay' even if there was an error, because it's not a syntax