X-Git-Url: http://git.openwrt.org/?p=project%2Fubox.git;a=blobdiff_plain;f=kmodloader.c;h=5667654ee1e2d5c910d7f4e839541a672d5e184a;hp=d72a1f452287e09a886792548eba24727e4e6778;hb=725444ad8dd42a6441499fae5a3e92dc99939cc1;hpb=d6e6825c4697513d201fc3b146fb167c61404a04 diff --git a/kmodloader.c b/kmodloader.c index d72a1f4..5667654 100644 --- a/kmodloader.c +++ b/kmodloader.c @@ -604,6 +604,8 @@ static int main_loader(int argc, char **argv) strcpy(path, dir); strcat(path, "*"); + scan_loaded_modules(); + syslog(0, "kmodloader: loading kernel modules from %s\n", path); if (glob(path, gl_flags, NULL, &gl) >= 0) { @@ -619,6 +621,7 @@ static int main_loader(int argc, char **argv) while (fgets(mod, sizeof(mod), fp)) { char *nl = strchr(mod, '\n'); + struct module *m; char *opts; if (nl) @@ -628,6 +631,9 @@ static int main_loader(int argc, char **argv) if (opts) *opts++ = '\0'; + m = find_module(get_module_name(mod)); + if (m) + continue; insert_module(get_module_path(mod), (opts) ? (opts) : ("")); } fclose(fp);