summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-10-07 20:00:15 +0000
committerJeremy Katz <katzj@redhat.com>2003-10-07 20:00:15 +0000
commit0c474ae6bfe2000643773e289a3eae2d798bb6c5 (patch)
treefa2a00434730dec60bb6c22eb3204c8aaaebf200
parent60e787c86328da77a936ab0d457beb34dbaeccdc (diff)
downloadanaconda-0c474ae6bfe2000643773e289a3eae2d798bb6c5.tar.gz
anaconda-0c474ae6bfe2000643773e289a3eae2d798bb6c5.tar.xz
anaconda-0c474ae6bfe2000643773e289a3eae2d798bb6c5.zip
The floppy shows up both as its usb device (with device == NULL) and the scsi
device (#106492) Changes: 1) Don't probe BUS_UNSPEC, do explicit IDE | SCSI | MISC. Use for both floppy and cd which reverts to old behavior + probing misc for cd (and thus catch viocd) 2) Make sure that device exists before adding to the list so something like this can't cause a problem in the future.
-rw-r--r--loader2/driverdisk.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/loader2/driverdisk.c b/loader2/driverdisk.c
index d1e193e01..100c77502 100644
--- a/loader2/driverdisk.c
+++ b/loader2/driverdisk.c
@@ -157,8 +157,10 @@ int getRemovableDevices(char *** devNames) {
int numDevices = 0;
int i = 0, j = 0;
- floppies = probeDevices(CLASS_FLOPPY, BUS_UNSPEC, PROBE_ALL);
- cdroms = probeDevices(CLASS_CDROM, BUS_UNSPEC, PROBE_ALL);
+ floppies = probeDevices(CLASS_FLOPPY,
+ BUS_IDE | BUS_SCSI | BUS_MISC, PROBE_ALL);
+ cdroms = probeDevices(CLASS_CDROM,
+ BUS_IDE | BUS_SCSI | BUS_MISC, PROBE_ALL);
/* we should probably take detached into account here, but it just
* means we use a little bit more memory than we really need to */
@@ -178,10 +180,12 @@ int getRemovableDevices(char *** devNames) {
i = 0;
if (floppies)
for (j = 0; floppies[j]; j++)
- if (floppies[j]->detached == 0) devices[i++] = floppies[j];
+ if ((floppies[j]->detached == 0) && (floppies[j]->device != NULL))
+ devices[i++] = floppies[j];
if (cdroms)
for (j = 0; cdroms[j]; j++)
- if (cdroms[j]->detached == 0) devices[i++] = cdroms[j];
+ if ((cdroms[j]->detached == 0) && (cdroms[j]->device != NULL))
+ devices[i++] = cdroms[j];
devices[i] = NULL;
numDevices = i;