Commit 925566b0 authored by Robert Schmidt's avatar Robert Schmidt

module loader: remove printf(), put error into printf(stderr)

parent 85e198b1
...@@ -49,7 +49,7 @@ void loader_init(void) { ...@@ -49,7 +49,7 @@ void loader_init(void) {
loader_data.mainexec_buildversion = OAI_PACKAGE_VERSION; loader_data.mainexec_buildversion = OAI_PACKAGE_VERSION;
int ret = config_get(config_get_if(), LoaderParams, sizeofArray(LoaderParams), LOADER_CONFIG_PREFIX); int ret = config_get(config_get_if(), LoaderParams, sizeofArray(LoaderParams), LOADER_CONFIG_PREFIX);
if (ret <0) { if (ret <0) {
printf("[LOADER] configuration couldn't be performed via config module, parameters set to default values\n"); fprintf(stderr, "[LOADER] configuration couldn't be performed via config module, parameters set to default values\n");
if (loader_data.shlibpath == NULL) { if (loader_data.shlibpath == NULL) {
loader_data.shlibpath=DEFAULT_PATH; loader_data.shlibpath=DEFAULT_PATH;
} }
...@@ -136,12 +136,9 @@ int load_module_version_shlib(char *modname, char *version, loader_shlibfunc_t * ...@@ -136,12 +136,9 @@ int load_module_version_shlib(char *modname, char *version, loader_shlibfunc_t *
} }
shlib_path = loader_format_shlibpath(modname, version); shlib_path = loader_format_shlibpath(modname, version);
printf("shlib_path %s\n", shlib_path);
for (int i = 0; i < loader_data.numshlibs; i++) { for (int i = 0; i < loader_data.numshlibs; i++) {
if (strcmp(loader_data.shlibs[i].name, modname) == 0) { if (strcmp(loader_data.shlibs[i].name, modname) == 0) {
printf("[LOADER] library %s has been loaded previously, reloading function pointers\n",
shlib_path);
lib_idx = i; lib_idx = i;
break; break;
} }
...@@ -165,7 +162,6 @@ int load_module_version_shlib(char *modname, char *version, loader_shlibfunc_t * ...@@ -165,7 +162,6 @@ int load_module_version_shlib(char *modname, char *version, loader_shlibfunc_t *
goto load_module_shlib_exit; goto load_module_shlib_exit;
} }
printf("[LOADER] library %s successfully loaded\n", shlib_path);
afname = malloc(strlen(modname)+15); afname = malloc(strlen(modname)+15);
if (!afname) { if (!afname) {
fprintf(stderr, "[LOADER] unable to allocate memory for library %s\n", shlib_path); fprintf(stderr, "[LOADER] unable to allocate memory for library %s\n", shlib_path);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment