summaryrefslogtreecommitdiffstats
path: root/loader/modules.c
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1999-07-21 18:46:29 +0000
committerErik Troan <ewt@redhat.com>1999-07-21 18:46:29 +0000
commit5c2121605db0ad710eb6c9f6d120eafe1c1aa212 (patch)
treef2856fd0dcbcb328be85305af493e6a72e88021d /loader/modules.c
parent21f92deddbc1d695cd59af284f97499b4a396225 (diff)
downloadanaconda-5c2121605db0ad710eb6c9f6d120eafe1c1aa212.tar.gz
anaconda-5c2121605db0ad710eb6c9f6d120eafe1c1aa212.tar.xz
anaconda-5c2121605db0ad710eb6c9f6d120eafe1c1aa212.zip
1) added testing parameter to mlLoadModule()
2) we need to append .o to module names
Diffstat (limited to 'loader/modules.c')
-rw-r--r--loader/modules.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/loader/modules.c b/loader/modules.c
index bb65e6244..e7d3b2844 100644
--- a/loader/modules.c
+++ b/loader/modules.c
@@ -165,25 +165,35 @@ static int moduleLoaded(moduleList modList, const char * name) {
}
int mlLoadModule(struct moduleInfo * modInfo, moduleList modLoaded,
- moduleDeps modDeps) {
+ moduleDeps modDeps, int testing) {
moduleDeps dep;
char ** nextDep;
+ char modName[80];
+ int rc;
+
for (dep = modDeps; dep->name && strcmp(dep->name, modInfo->moduleName);
dep++);
- if (dep) {
+ if (dep && dep->deps) {
nextDep = dep->deps;
while (*nextDep) {
if (!moduleLoaded(modLoaded, *nextDep)) {
- insmod(*nextDep, NULL);
+ sprintf(modName, "%s.o", *nextDep);
+ if (!testing) insmod(*nextDep, NULL);
}
dep++;
}
}
- return insmod(modInfo->moduleName, NULL);
+ if (testing) return 0;
+
+ sprintf(modName, "%s.o", modInfo->moduleName);
+
+ rc = insmod(modName, NULL);
+ sleep(2);
+ return rc;
}
char ** mlGetDeps(moduleDeps modDeps, const char * modName) {