summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2004-03-11 22:25:05 +0000
committerJeremy Katz <katzj@redhat.com>2004-03-11 22:25:05 +0000
commitfd7f514907039434fb924f644463dd7fc14d4324 (patch)
tree5d5bede8410422044bcc7789d1a21eee7add4e11
parent2a31b60ea114b65a688b2dc714766fd81e8da946 (diff)
downloadanaconda-fd7f514907039434fb924f644463dd7fc14d4324.tar.gz
anaconda-fd7f514907039434fb924f644463dd7fc14d4324.tar.xz
anaconda-fd7f514907039434fb924f644463dd7fc14d4324.zip
first pass at getting noprobe to do something sane. if there's a device that
requires a driver but we don't have the driver, then we probably shouldn't count it. this will at least let things sort of work, but isn't a real solution for the problem (since we'll then show both network devices even if only one of the drivers is loaded, etc)
-rw-r--r--loader2/loader.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/loader2/loader.c b/loader2/loader.c
index f1b75012c..1f5ee8abc 100644
--- a/loader2/loader.c
+++ b/loader2/loader.c
@@ -630,12 +630,25 @@ static void checkForRam(int flags) {
}
}
-static int haveDeviceOfType(int type) {
+static int haveDeviceOfType(int type, moduleList modLoaded) {
struct device ** devices;
devices = probeDevices(type, BUS_UNSPEC, 0);
- if (devices)
- return 1;
+ if (devices) {
+ int i;
+ for (i = 0; devices[i]; i++) {
+ if (devices[i]->driver && mlModuleInList(devices[i]->driver,
+ modLoaded)) {
+ logMessage("devices[%d] is %s - %s using %s (loaded)", i, devices[i]->desc, devices[i]->device, devices[i]->driver);
+ return 1;
+ } else if (!devices[i]->driver) {
+ logMessage("devices[%d] is %s - %s using %s (no driver)", i, devices[i]->desc, devices[i]->device, devices[i]->driver);
+ return 1;
+ } else {
+ logMessage("devices[%d] is %s - %s using %s (not loaded)", i, devices[i]->desc, devices[i]->device, devices[i]->driver);
+ }
+ }
+ }
return 0;
}
@@ -798,7 +811,7 @@ static char *doLoaderMain(char * location,
break;
case STEP_DRIVER: {
- if (needed == -1 || haveDeviceOfType(needed)) {
+ if (needed == -1 || haveDeviceOfType(needed, modLoaded)) {
step = STEP_NETWORK;
dir = 1;
needed = -1;
@@ -858,7 +871,7 @@ static char *doLoaderMain(char * location,
}
needsNetwork = 1;
- if (!haveDeviceOfType(CLASS_NETWORK)) {
+ if (!haveDeviceOfType(CLASS_NETWORK, modLoaded)) {
needed = CLASS_NETWORK;
step = STEP_DRIVER;
break;