From b8245fce554382524cff80598839dbca0be24562 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 20 Sep 2000 13:36:42 +0000 Subject: no_comment --- perl-install/ChangeLog | 7 +++++++ perl-install/detect_devices.pm | 13 ++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) (limited to 'perl-install') 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 + + * pci_probing/pcitable: replace es1371 by snd-card-ens1371 + 2000-09-20 dam's * Xconfigurator.pm (autologin): for urpmi, added `--best-output' and suspend/resume @@ -14,6 +18,9 @@ 2000-09-20 Pixel + * 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() { $_ = ; 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 }; } -- cgit v1.2.1