From fa82904a90e2d19f67f2e2ca8a4df6dba1eb6622 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Fri, 31 May 2002 20:06:24 +0000 Subject: [PATCH] Don't load a module from /stand/modules in the MFS root if it is already in the kernel. --- usr.sbin/sysinstall/modules.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.sbin/sysinstall/modules.c b/usr.sbin/sysinstall/modules.c index f18beb54363e..18acc4dd5c7f 100644 --- a/usr.sbin/sysinstall/modules.c +++ b/usr.sbin/sysinstall/modules.c @@ -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);