summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-09-15 15:28:35 +0000
committerBill Nottingham <notting@redhat.com>2005-09-15 15:28:35 +0000
commit5e1e9a0619de4c5103a99379312fb71eb7de3a63 (patch)
tree572c711dc9db68622fb995d77285fb0812ed92a7
parentf4fae513e46c4d5a28e116ec21ef547e5904525e (diff)
downloadanaconda-5e1e9a0619de4c5103a99379312fb71eb7de3a63.tar.gz
anaconda-5e1e9a0619de4c5103a99379312fb71eb7de3a63.tar.xz
anaconda-5e1e9a0619de4c5103a99379312fb71eb7de3a63.zip
* loader2/firewire.c: Handle 'NULL' in device->driver.
* loader2/hardware.c: Likewise. * loader2/pcmcia.c: Likewise. * loader2/usb.c: Likewise.
-rw-r--r--ChangeLog8
-rw-r--r--loader2/firewire.c4
-rw-r--r--loader2/hardware.c17
-rw-r--r--loader2/pcmcia.c4
-rw-r--r--loader2/usb.c3
5 files changed, 23 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 697417573..84004e773 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+
+2005-09-15 Bill Nottingham <notting@redhat.com>
+
+ * loader2/firewire.c: Handle 'NULL' in device->driver.
+ * loader2/hardware.c: Likewise.
+ * loader2/pcmcia.c: Likewise.
+ * loader2/usb.c: Likewise.
+
2005-09-15 Jeremy Katz <katzj@redhat.com>
* scripts/mk-images.i386: No more --pcmcia.
diff --git a/loader2/firewire.c b/loader2/firewire.c
index 6fb404846..8df5412fe 100644
--- a/loader2/firewire.c
+++ b/loader2/firewire.c
@@ -45,7 +45,9 @@ int firewireInitialize(moduleList modLoaded, moduleDeps modDeps,
/* JKFIXME: if we looked for all of them, we could batch this up and it
* would be faster */
for (i=0; devices[i]; i++) {
- logMessage(INFO, "found firewire controller %s", devices[i]->driver);
+ if (!devices[i]->driver)
+ continue;
+ logMessage(INFO, "found firewire controller %s", devices[i]->driver);
winStatus(40, 3, _("Loading"), _("Loading %s driver..."),
devices[0]->driver);
diff --git a/loader2/hardware.c b/loader2/hardware.c
index ddb595033..b54feb5a4 100644
--- a/loader2/hardware.c
+++ b/loader2/hardware.c
@@ -95,26 +95,27 @@ static int detectHardware(moduleInfoSet modInfo,
driver = (*device)->driver;
/* this is kind of icky and verbose. there are better and more
* general ways to do it but this is simple and obvious */
- if (FL_NOPCMCIA(flags) && ((*device)->type == CLASS_SOCKET)) {
+ if (!driver) {
+ logMessage(WARNING, "ignoring driverless device %s", (*device)->desc);
+ } else if (FL_NOPCMCIA(flags) && ((*device)->type == CLASS_SOCKET)) {
logMessage(WARNING, "ignoring pcmcia device %s (%s)",
- (*device)->desc, (*device)->driver);
+ (*device)->desc, driver);
} else if (FL_NOIEEE1394(flags) && ((*device)->type == CLASS_FIREWIRE)) {
logMessage(WARNING, "ignoring firewire device %s (%s)",
- (*device)->desc, (*device)->driver);
+ (*device)->desc, driver);
} else if (FL_NOUSB(flags) && ((*device)->type == CLASS_USB)) {
logMessage(WARNING, "ignoring usb device %s (%s)", (*device)->desc,
- (*device)->driver);
+ driver);
} else if (FL_NOSTORAGE(flags) &&
(((*device)->type == CLASS_SCSI) ||
((*device)->type == CLASS_IDE) ||
((*device)->type == CLASS_RAID))) {
logMessage(WARNING, "ignoring storage device %s (%s)",
- (*device)->desc, (*device)->driver);
+ (*device)->desc, driver);
} else if (FL_NONET(flags) && ((*device)->type == CLASS_NETWORK)) {
logMessage(WARNING, "ignoring network device %s (%s)",
- (*device)->desc, (*device)->driver);
- } else if (strcmp (driver, "ignore") && strcmp (driver, "unknown")
- && strcmp (driver, "disabled")) {
+ (*device)->desc, driver);
+ } else {
modList[numMods++] = strdup(driver);
}
diff --git a/loader2/pcmcia.c b/loader2/pcmcia.c
index 80e0ee95b..4ecd1686e 100644
--- a/loader2/pcmcia.c
+++ b/loader2/pcmcia.c
@@ -43,9 +43,7 @@ char * getPcicController() {
int x;
for (x = 0; devices[x]; x++) {
- if (strcmp(devices[x]->driver, "ignore") &&
- strcmp(devices[x]->driver, "unknown") &&
- strcmp(devices[x]->driver, "disabled")) {
+ if (devices[x]->driver) {
char *tmp;
logMessage(INFO, "found pcmcia adapter %s", devices[x]->driver);
diff --git a/loader2/usb.c b/loader2/usb.c
index 7cfa13d01..dac4042d9 100644
--- a/loader2/usb.c
+++ b/loader2/usb.c
@@ -81,6 +81,7 @@ int usbInitialize(moduleList modLoaded, moduleDeps modDeps,
/* JKFIXME: if we looked for all of them, we could batch this up and it
* would be faster */
for (i=0; devices[i]; i++) {
+ if (!devices[i]->driver) continue;
logMessage(INFO, "found USB controller %s", devices[i]->driver);
if (mlLoadModuleSet(devices[i]->driver, modLoaded, modDeps,
@@ -111,7 +112,7 @@ int usbInitialize(moduleList modLoaded, moduleDeps modDeps,
devices = probeDevices(CLASS_UNSPEC, BUS_USB, PROBE_ALL);
if (devices) {
for (i = 0; devices[i]; i++) {
- if (!strcmp(devices[i]->driver, "usb-storage")) {
+ if (devices[i]->driver && !strcmp(devices[i]->driver, "usb-storage")) {
loadUsbStorage = 1;
break;
}