Don't load a module from /stand/modules in the MFS root if it is already in

the kernel.
This commit is contained in:
John Baldwin 2002-05-31 20:06:24 +00:00
parent 2d80eecc97
commit fa82904a90

View File

@ -62,6 +62,10 @@ moduleInitialize(void)
while ((dp = readdir(dirp))) {
if (dp->d_namlen < (sizeof(".ko") - 1)) continue;
if (strcmp(dp->d_name + dp->d_namlen - (sizeof(".ko") - 1), ".ko") == 0) {
strcpy(module, dp->d_name);
module[dp->d_namlen - (sizeof(".ko") - 1)] = '\0';
if (modfind(module) != -1)
continue;
strcpy(module, MODULESDIR);
strcat(module, "/");
strcat(module, dp->d_name);