diff options
author | Chris Lumens <clumens@redhat.com> | 2007-07-20 21:15:05 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2007-07-20 21:15:05 +0000 |
commit | 7335dbd1189779c5e5e542ea6839da583d8c2d24 (patch) | |
tree | e5e3a6eb42717a26b7481412e1e260d66ec2cd69 /loader2 | |
parent | 37caf3a8e64f1c62baf7e041671d342e73928ee6 (diff) | |
download | anaconda-7335dbd1189779c5e5e542ea6839da583d8c2d24.tar.gz anaconda-7335dbd1189779c5e5e542ea6839da583d8c2d24.tar.xz anaconda-7335dbd1189779c5e5e542ea6839da583d8c2d24.zip |
Apply Peter's patch to fix the usb-storage unloading and reloading dance
(#247830).
Diffstat (limited to 'loader2')
-rw-r--r-- | loader2/modules.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/loader2/modules.c b/loader2/modules.c index ca68f6ab3..e8a219e57 100644 --- a/loader2/modules.c +++ b/loader2/modules.c @@ -507,13 +507,16 @@ static int doLoadModules(const char * origModNames, moduleList modLoaded, if (modInfo) { for (i = 0; list[i]; i++) { mi = findModuleInfo(modInfo, list[i]); - if (mi && mi->locationID) { - paths = extractModules(list, paths, mi->locationID); - - if (mi->major == DRIVER_SCSI && - (mod = getLoadedModuleInfo(modLoaded, "usb-storage")) && - (mod->firstDevNum != mod->lastDevNum)) { - reloadUsbStorage = 1; + if (mi) { + if (mi->locationID) + paths = extractModules(list, paths, mi->locationID); + + if (mi->major == DRIVER_SCSI) { + if ((mod = getLoadedModuleInfo(modLoaded, "usb-storage")) && + mod->firstDevNum != mod->lastDevNum) { + logMessage(DEBUGLVL, "setting reloadUsbStorage"); + reloadUsbStorage = 1; + } } } @@ -553,6 +556,7 @@ static int doLoadModules(const char * origModNames, moduleList modLoaded, } /* here we need to save the state of stage2 */ + logMessage(INFO, "unloading module usb-storage"); removeLoadedModule("usb-storage", modLoaded); @@ -581,6 +585,7 @@ static int doLoadModules(const char * origModNames, moduleList modLoaded, } if (reloadUsbStorage) { + logMessage(INFO, "reloading module usb-storage"); mlLoadModule("usb-storage", modLoaded, modDeps, modInfo, NULL); /* JKFIXME: here's the rest of the hacks. basically do the reverse * of what we did before. |