aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sysinstall
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2002-06-03 22:36:52 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2002-06-03 22:36:52 +0000
commit30c00e6c41538dc8277a5be0fc1a6354da0b7585 (patch)
tree3fa612f86760982d9ebcaa61eb550878ded6580b /usr.sbin/sysinstall
parenta7fabc2b600c219195be72ca4bbda378cb0385ee (diff)
Notes
Diffstat (limited to 'usr.sbin/sysinstall')
-rw-r--r--usr.sbin/sysinstall/modules.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.sbin/sysinstall/modules.c b/usr.sbin/sysinstall/modules.c
index 18acc4dd5c7f..b969ce46a5e5 100644
--- a/usr.sbin/sysinstall/modules.c
+++ b/usr.sbin/sysinstall/modules.c
@@ -62,10 +62,6 @@ 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);
@@ -88,7 +84,7 @@ moduleInitialize(void)
msgDebug("Loading module %s (%s)\n", dp->d_name, desc_str);
else
msgDebug("Loading module %s\n", dp->d_name);
- if (kldload(module) < 0) {
+ if (kldload(module) < 0 && errno != EEXIST) {
if (desc_str[0])
msgConfirm("Loading module %s failed\n%s", dp->d_name, desc_str);
else
@@ -197,7 +193,7 @@ kldModuleFire(dialogMenuItem *self) {
bzero(fname, sizeof(fname));
snprintf(fname, sizeof(fname), "%s/%s", DISTMOUNT, self->prompt);
- if (kldload(fname) < 0) {
+ if (kldload(fname) < 0 && errno != EEXIST) {
if (!variable_get(VAR_NO_ERROR))
msgConfirm("Loading module %s failed\n", fname);
} else {