summaryrefslogtreecommitdiffstats
path: root/loader/modules.c
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-06-03 00:42:10 +0000
committerErik Troan <ewt@redhat.com>2000-06-03 00:42:10 +0000
commit186fef98e666786b9881b2c154ea60de8a217b6d (patch)
treecb7a042d7214c1d4903d124b04cc31f078364007 /loader/modules.c
parent93d143385829ca1685e003dff08efa79b1c1dec1 (diff)
downloadanaconda-186fef98e666786b9881b2c154ea60de8a217b6d.tar.gz
anaconda-186fef98e666786b9881b2c154ea60de8a217b6d.tar.xz
anaconda-186fef98e666786b9881b2c154ea60de8a217b6d.zip
driver disks seem to work now :-)
Diffstat (limited to 'loader/modules.c')
-rw-r--r--loader/modules.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/loader/modules.c b/loader/modules.c
index c7e69b3be..821dccf79 100644
--- a/loader/modules.c
+++ b/loader/modules.c
@@ -206,8 +206,7 @@ static void removeExtractedModule(char * path) {
rmdir(path);
}
-int mlLoadModule(char * modName, enum miLocationTypes locationType,
- char * location, moduleList modLoaded,
+int mlLoadModule(char * modName, void * location, moduleList modLoaded,
moduleDeps modDeps, char ** args, moduleInfoSet modInfo,
int flags) {
moduleDeps dep;
@@ -220,6 +219,7 @@ int mlLoadModule(char * modName, enum miLocationTypes locationType,
pid_t child;
int status;
char * path = NULL;
+ int needUmount = 0;
if (mlModuleInList(modName, modLoaded)) {
return 0;
@@ -237,20 +237,16 @@ int mlLoadModule(char * modName, enum miLocationTypes locationType,
if (dep && dep->deps) {
nextDep = dep->deps;
while (*nextDep) {
- if (mlLoadModule(*nextDep, locationType, location, modLoaded,
- modDeps, NULL, modInfo, flags) && location)
- mlLoadModule(*nextDep, MI_LOCATION_NONE, NULL, modLoaded,
- modDeps, NULL, modInfo, flags);
+ if (mlLoadModule(*nextDep, location, modLoaded, modDeps, NULL,
+ modInfo, flags) && location)
+ mlLoadModule(*nextDep, NULL, modLoaded, modDeps, NULL,
+ modInfo, flags);
nextDep++;
}
}
- if (locationType == MI_LOCATION_DISKNAME) {
+ if (location)
path = extractModule(location, modName);
- if (!path) return 1;
- } else if (locationType == MI_LOCATION_DIRECTORY) {
- path = strdup(location);
- }
sprintf(fileName, "%s.o", modName);
for (argPtr = args; argPtr && *argPtr; argPtr++) {
@@ -288,6 +284,9 @@ int mlLoadModule(char * modName, enum miLocationTypes locationType,
}
}
+ if (needUmount)
+ umount(path);
+
if (!rc) {
modLoaded->mods[modLoaded->numModules].name = strdup(modName);
modLoaded->mods[modLoaded->numModules].weLoaded = 1;