summaryrefslogtreecommitdiffstats
path: root/modules.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-02 12:34:20 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-02 12:34:20 +0000
commit24c5e87b82a655ac7556f66f4d1cec8c3fe9ee2a (patch)
treecfc29c83596240e9c77e9b06ed5da3a4d38d61b4 /modules.c
parentff790810517ce193efab3841ae51330f7c1a72bc (diff)
downloadrsyslog-24c5e87b82a655ac7556f66f4d1cec8c3fe9ee2a.tar.gz
rsyslog-24c5e87b82a655ac7556f66f4d1cec8c3fe9ee2a.tar.xz
rsyslog-24c5e87b82a655ac7556f66f4d1cec8c3fe9ee2a.zip
added more meaningful error messages to rsyslogd (when some errors happens
during startup)
Diffstat (limited to 'modules.c')
-rw-r--r--modules.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules.c b/modules.c
index b6164f91..86ee64a5 100644
--- a/modules.c
+++ b/modules.c
@@ -594,7 +594,7 @@ Load(uchar *pModName)
} else {
errmsg.LogError(NO_ERRCODE, "could not load module '%s', path too long\n", pModName);
free(pModNameDup);
- ABORT_FINALIZE(RS_RET_ERR);
+ ABORT_FINALIZE(RS_RET_MODULE_LOAD_ERR_PATHLEN);
}
}
}
@@ -619,24 +619,24 @@ Load(uchar *pModName)
if(iPathLen + strlen((char*) pModName) >= sizeof(szPath)) {
errmsg.LogError(NO_ERRCODE, "could not load module '%s', path too long\n", pModName);
- ABORT_FINALIZE(RS_RET_ERR);
+ ABORT_FINALIZE(RS_RET_MODULE_LOAD_ERR_PATHLEN);
}
/* complete load path constructed, so ... GO! */
dbgprintf("loading module '%s'\n", szPath);
if(!(pModHdlr = dlopen((char *) szPath, RTLD_NOW))) {
errmsg.LogError(NO_ERRCODE, "could not load module '%s', dlopen: %s\n", szPath, dlerror());
- ABORT_FINALIZE(RS_RET_ERR);
+ ABORT_FINALIZE(RS_RET_MODULE_LOAD_ERR_DLOPEN);
}
if(!(pModInit = dlsym(pModHdlr, "modInit"))) {
errmsg.LogError(NO_ERRCODE, "could not load module '%s', dlsym: %s\n", szPath, dlerror());
dlclose(pModHdlr);
- ABORT_FINALIZE(RS_RET_ERR);
+ ABORT_FINALIZE(RS_RET_MODULE_LOAD_ERR_NO_INIT);
}
if((iRet = doModInit(pModInit, (uchar*) pModName, pModHdlr)) != RS_RET_OK) {
errmsg.LogError(NO_ERRCODE, "could not load module '%s', rsyslog error %d\n", szPath, iRet);
dlclose(pModHdlr);
- ABORT_FINALIZE(RS_RET_ERR);
+ ABORT_FINALIZE(RS_RET_MODULE_LOAD_ERR_INIT_FAILED);
}
finalize_it: