[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] allow dd=URL to update storage drivers



See BZ 454478 on RHEL 5.

When downloading a driver disk from an http or ftp server with
  linux dd=http://...
the loader first calls busProbe() to load the network drivers, but this also loads storage drivers (and more), so you cannot update storage drivers with this method.

The attached patch turns the LOADER_FLAGS_NOSTORAGE flag on before calling busProbe() and then restores the original flags afterwards. This loads the network drivers, but doesn't touch storage until the next call to busProbe() which will use the updated drivers.

Thoughts?

Jeff
--- anaconda-11.1.2.87/loader2/loader.c	2007-10-17 19:37:45.000000000 +0200
+++ anaconda-11.1.2.87/loader2/loader.c.new	2008-06-11 17:57:19.000000000 +0200
@@ -1552,13 +1552,14 @@ int main(int argc, char ** argv) {
      */
     earlyModuleLoad(modInfo, modLoaded, modDeps, 0);
 
-    busProbe(modInfo, modLoaded, modDeps, 0);
-
-    /* JKFIXME: we'd really like to do this before the busprobe, but then
-     * we won't have network devices available (and that's the only thing
-     * we support with this right now */
     if (loaderData.ddsrc != NULL) {
+        uint64_t save_flags = flags;
+        flags |= LOADER_FLAGS_NOSTORAGE;
+        busProbe(modInfo, modLoaded, modDeps, 0);
+        flags = save_flags;
         getDDFromSource(&loaderData, loaderData.ddsrc);
+    } else {
+        busProbe(modInfo, modLoaded, modDeps, 0);
     }
 
     /* JKFIXME: loaderData->ksFile is set to the arg from the command line,

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]