diff options
author | jhb <jhb@FreeBSD.org> | 2002-06-03 22:36:52 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2002-06-03 22:36:52 +0000 |
commit | 44fd6d90917f2b1e84ab106f71036d5a36025275 (patch) | |
tree | 3fa612f86760982d9ebcaa61eb550878ded6580b | |
parent | 6d55ec63aa05ecfe891916f72f86c217d39535ba (diff) | |
download | FreeBSD-src-44fd6d90917f2b1e84ab106f71036d5a36025275.zip FreeBSD-src-44fd6d90917f2b1e84ab106f71036d5a36025275.tar.gz |
Backout revision 1.2 since it didn't work and replace it with a fix that
actually does work. Ignore errors from kldload(2) if the errno value is
EEXIST. It would help if this return value were documented in the
kldload(2) manual page.
-rw-r--r-- | usr.sbin/sysinstall/modules.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.sbin/sysinstall/modules.c b/usr.sbin/sysinstall/modules.c index 18acc4d..b969ce4 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 { |