diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | loader2/modules.c | 31 |
2 files changed, 20 insertions, 17 deletions
@@ -1,5 +1,11 @@ 2007-06-22 Peter Jones <pjones@redhat.com> + * loader2/modules.c: Get rid of "modLocation" parameter to + doLoadModules(); it is never used. Also call extractModules for each + location and for NULL (default) location. + +2007-06-22 Peter Jones <pjones@redhat.com> + * loader2/fwloader.[ch]: add this. It's a small firmware loader. * loader2/udelay.h: add this. It's some time-related helper diff --git a/loader2/modules.c b/loader2/modules.c index 6b1685bf5..b65421eda 100644 --- a/loader2/modules.c +++ b/loader2/modules.c @@ -443,8 +443,7 @@ static char ** lateModuleSort(char **allmods, int num) { * *ALL* modules? this would probably want for auto module-info generation */ static int doLoadModules(const char * origModNames, moduleList modLoaded, moduleDeps modDeps, moduleInfoSet modInfo, - const char * argModule, char ** args, - struct moduleBallLocation * modLocation) { + const char * argModule, char ** args) { char * modNames; char * start, * next, * end; char ** initialList; @@ -509,24 +508,22 @@ static int doLoadModules(const char * origModNames, moduleList modLoaded, if (modInfo) { for (i = 0; list[i]; i++) { mi = findModuleInfo(modInfo, list[i]); + if (mi) { + if (mi->locationID) + location = mi->locationID; + paths = extractModules(list, paths, location); + + if (mi->major == DRIVER_SCSI && + (mod = getLoadedModuleInfo(modLoaded, "usb-storage")) && + (mod->firstDevNum != mod->lastDevNum)) { + reloadUsbStorage = 1; + } - if (mi && mi->locationID) { - location = mi->locationID; - } - - if (mi && (mi->major == DRIVER_SCSI) && - (mod = getLoadedModuleInfo(modLoaded, "usb-storage")) && - (mod->firstDevNum != mod->lastDevNum)) { - reloadUsbStorage = 1; } } } - /* JKFIXME: this is a hack to handle an explicit location for modules */ - if (!location && modLocation) - location = modLocation; - - paths = extractModules(list, paths, location); + paths = extractModules(list, paths, NULL); i = 0; if (!paths) { @@ -615,7 +612,7 @@ int mlLoadModule(const char * module, moduleList modLoaded, moduleDeps modDeps, moduleInfoSet modInfo, char ** args) { return doLoadModules(module, modLoaded, modDeps, modInfo, module, - args, NULL); + args); } /* loads a : separated list of modules */ @@ -623,7 +620,7 @@ int mlLoadModuleSet(const char * modNames, moduleList modLoaded, moduleDeps modDeps, moduleInfoSet modInfo) { return doLoadModules(modNames, modLoaded, modDeps, modInfo, - NULL, NULL, NULL); + NULL, NULL); } static int removeHostAdapter(char *conf, char *name) { |