From 43d66222dd584cbdfa479816200284385112943c Mon Sep 17 00:00:00 2001 From: jhb Date: Fri, 31 May 2002 20:06:24 +0000 Subject: 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(+) (limited to 'usr.sbin/sysinstall') diff --git a/usr.sbin/sysinstall/modules.c b/usr.sbin/sysinstall/modules.c index f18beb5..18acc4d 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); -- cgit v1.1