diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/ChangeLog | 7 | ||||
-rw-r--r-- | perl-install/detect_devices.pm | 13 |
2 files changed, 17 insertions, 3 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog index 32eacca0c..352a12c1d 100644 --- a/perl-install/ChangeLog +++ b/perl-install/ChangeLog @@ -1,3 +1,7 @@ +2000-09-20 Pixel <pixel@mandrakesoft.com> + + * pci_probing/pcitable: replace es1371 by snd-card-ens1371 + 2000-09-20 dam's <damien@mandrakesoft.com> * Xconfigurator.pm (autologin): for urpmi, added `--best-output' and suspend/resume @@ -14,6 +18,9 @@ 2000-09-20 Pixel <pixel@mandrakesoft.com> + * detect_devices.pm (isFloppyOrHD): detects wether a device is a + floppy or not based on its size (for scsi floppy) + * Xconfigurator.pm (testFinalConfig): check if "server" OR "driver" field is set (otherwise XF4 only card won't pass) diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 88db1cb2d..169acf627 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -81,6 +81,13 @@ sub hasIDE() { -e "/proc/ide" } sub hasDAC960() { 1 } sub hasCompaqSmartArray() { -r "/proc/array/ida0" } +sub isFloppyOrHD { + my ($dev) = @_; + require partition_table_raw; + my $geom = partition_table_raw::get_geometry(devices::make($dev)); + $geom->{totalsectors} < 10 << 11 ? 'floppy' : 'hd'; +} + sub getSCSI() { my @drives; my ($driveNum, $cdromNum, $tapeNum) = qw(0 0 0); @@ -96,14 +103,14 @@ sub getSCSI() { $_ = <F>; my ($type) = /^\s*Type:\s*(.*)/ or &$err(); my $device; if ($type =~ /Direct-Access/) { #- what about LS-120 floppy drive, assuming there are Direct-Access... - $type = 'hd'; $device = "sd" . chr($driveNum++ + ord('a')); + $type = isFloppyOrHD($device); } elsif ($type =~ /Sequential-Access/) { - $type = 'tape'; $device = "st" . $tapeNum++; + $type = 'tape'; } elsif ($type =~ /CD-ROM/) { - $type = 'cdrom'; $device = "scd" . $cdromNum++; + $type = 'cdrom'; } $device and push @drives, { device => $device, type => $type, info => "$vendor $model", id => $id, bus => 0 }; } |