From 9457bb8983117960600190a257dc033497e2ca70 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sat, 2 Mar 2002 11:13:01 +0000 Subject: ZIPs and Jazz's are not floppies --- perl-install/detect_devices.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'perl-install/detect_devices.pm') diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 73c768d5c..e14e2f324 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -39,7 +39,7 @@ sub cdroms { grep { $_->{media_type} eq 'cdrom' } get() } sub burners { grep { isBurner($_) } cdroms() } sub dvdroms { grep { isDvdDrive($_) } cdroms() } sub raw_zips { grep { member($_->{media_type}, 'fd', 'hd') && isZipDrive($_) } get() } -#-sub jazzs { grep { member($_->{media_type}, 'fd', 'hd') && isJazDrive($_) } get() } +#-sub jazzs { grep { member($_->{media_type}, 'fd', 'hd') && isJazzDrive($_) } get() } sub ls120s { grep { member($_->{media_type}, 'fd', 'hd') && isLS120Drive($_) } get() } sub zips { map { $_->{device} .= 4; $_ } raw_zips() } @@ -82,7 +82,7 @@ sub floppies() { my @ide = ls120s() and eval { modules::load("ide-floppy") }; eval { modules::load("usb-storage") } if usbStorage(); - my @scsi = grep { $_->{media_type} eq 'fd' } getSCSI(); + my @scsi = grep { $_->{media_type} eq 'fd' && !isZipDrive($_) && !isJazzDrive($_) } getSCSI(); @ide, @scsi, @fds; } sub floppies_dev() { map { $_->{device} } floppies() } @@ -135,7 +135,7 @@ sub isDvdDrive { $f && c::isDvdDrive(fileno($f)); } sub isZipDrive { $_[0]->{info} =~ /ZIP\s+\d+/ } #- accept ZIP 100, untested for bigger ZIP drive. -#-sub isJazzDrive { $_[0]->{info} =~ /JAZZ?\s+/ } #- untested. +sub isJazzDrive { $_[0]->{info} =~ /JAZZ?\s+/ } #- untested. sub isLS120Drive { $_[0]->{info} =~ /LS-?120|144MB/ } sub isRemovableDrive { &isZipDrive || &isLS120Drive || $_[0]->{media_type} eq 'fd' } #-or &isJazzDrive } @@ -160,7 +160,7 @@ sub getSCSI() { $_ = ; my ($vendor, $model) = /^\s*Vendor:\s*(.*?)\s+Model:\s*(.*?)\s+Rev:/ or return &$err(); $_ = ; my ($type) = /^\s*Type:\s*(.*)/ or &$err(); my $device; - if ($type =~ /Direct-Access/) { #- what about LS-120 floppy drive, assuming there are Direct-Access... + if ($type =~ /Direct-Access/) { $device = "sd" . chr($driveNum++ + ord('a')); $type = isFloppyOrHD($device); } elsif ($type =~ /Sequential-Access/) { -- cgit v1.2.1