diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-09-20 13:36:42 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-09-20 13:36:42 +0000 |
commit | b8245fce554382524cff80598839dbca0be24562 (patch) | |
tree | f8d1a2f41fedd2df6d97f977348c1e0f1381c32a /perl-install | |
parent | ad8a00814c37a9ca71ea7a661aab6508664d238f (diff) | |
download | drakx-backup-do-not-use-b8245fce554382524cff80598839dbca0be24562.tar drakx-backup-do-not-use-b8245fce554382524cff80598839dbca0be24562.tar.gz drakx-backup-do-not-use-b8245fce554382524cff80598839dbca0be24562.tar.bz2 drakx-backup-do-not-use-b8245fce554382524cff80598839dbca0be24562.tar.xz drakx-backup-do-not-use-b8245fce554382524cff80598839dbca0be24562.zip |
no_comment
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 }; } |