- do not threat EEXIST as error during insmod

This commit is contained in:
Sergey Bolshakov 2007-04-18 15:28:21 +04:00
parent 8df2e8a58b
commit 608c139db2

View File

@ -101,11 +101,11 @@ int insmod_call(char *pathname, char *params)
rc = init_module(file, len, params == NULL ? "" : params);
free(file);
if (rc != 0) {
if (rc != 0 && errno != EEXIST) {
log_message("init_module: '%s': %s", pathname, moderror(errno));
return rc;
}
return rc;
return 0;
}
static enum insmod_return insmod_archived_file(const char * mod_name, char * options)
@ -126,7 +126,7 @@ static enum insmod_return insmod_archived_file(const char * mod_name, char * opt
rc = init_module(file, len, options == NULL ? "" : options);
free(file);
if (rc != 0) {
if (rc != 0 && errno != EEXIST) {
log_message("init_module: '%s': %s", module_name, moderror(errno));
return INSMOD_FAILED;
}