[PATCH] Fix detection of RAW driverdisc partitions while in manual selection mode

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

 



Related: rhbz#732496
---
 loader/driverdisk.c |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/loader/driverdisk.c b/loader/driverdisk.c
index 37f71f1..df9d311 100644
--- a/loader/driverdisk.c
+++ b/loader/driverdisk.c
@@ -432,6 +432,8 @@ int getRemovableDevices(char *** devNames) {
     return numDevices;
 }
 
+static void getDDFromDev(struct loaderData_s * loaderData, char * dev, GTree *moduleState);
+
 /* Prompt for loading a driver from "media"
  *
  * class: type of driver to load.
@@ -442,7 +444,7 @@ int loadDriverFromMedia(int class, struct loaderData_s *loaderData,
     char * device = NULL, * part = NULL, * ddfile = NULL;
     char ** devNames = NULL;
     enum { DEV_DEVICE, DEV_PART, DEV_CHOOSEFILE, DEV_LOADFILE, 
-           DEV_INSERT, DEV_LOAD, DEV_PROBE, 
+           DEV_INSERT, DEV_LOAD, DEV_PROBE, DEV_LOADRAW,
            DEV_DONE } stage = DEV_DEVICE;
     int rc, num = 0;
     int dir = 1;
@@ -548,6 +550,12 @@ int loadDriverFromMedia(int class, struct loaderData_s *loaderData,
                 break;
             }
 
+            /* check if the partition contains the DD in raw format */
+            if (verifyDriverDisk("/tmp/dpart") == LOADER_OK) {
+                stage = DEV_LOADRAW;
+                break;
+            }
+
             ddfile = newt_select_file(_("Select driver disk image"),
                                       _("Select the file which is your driver "
                                         "disk image."),
@@ -712,6 +720,12 @@ int loadDriverFromMedia(int class, struct loaderData_s *loaderData,
             break;
         }
 
+
+        case DEV_LOADRAW:
+            getDDFromDev(loaderData, part, moduleState);
+            stage = DEV_PROBE;
+            break;
+
         case DEV_DONE:
             break;
         }
@@ -799,7 +813,6 @@ void getDDFromSource(struct loaderData_s * loaderData, char * src, GTree *module
 
 }
 
-static void getDDFromDev(struct loaderData_s * loaderData, char * dev, GTree *moduleState);
 
 void useKickstartDD(struct loaderData_s * loaderData,
                     int argc, char ** argv) {
-- 
1.7.4.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux