summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-07-22 07:03:07 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-07-22 07:03:07 +0000
commit8a74440570937d1ba8e7eec905cebd3f130b6e65 (patch)
tree2d5e633408668d1ac2b61545c341f327263357ed
parenta3291a18bbb7466938effadec1fe22595cb4fdc5 (diff)
downloaddrakx-8a74440570937d1ba8e7eec905cebd3f130b6e65.tar
drakx-8a74440570937d1ba8e7eec905cebd3f130b6e65.tar.gz
drakx-8a74440570937d1ba8e7eec905cebd3f130b6e65.tar.bz2
drakx-8a74440570937d1ba8e7eec905cebd3f130b6e65.tar.xz
drakx-8a74440570937d1ba8e7eec905cebd3f130b6e65.zip
- re-indent
- use begins_with()
-rw-r--r--perl-install/detect_devices.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index ae6fdc2a7..da84a17f4 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -175,12 +175,15 @@ sub isDvdDrive {
sub isZipDrive { $_[0]{info} =~ /ZIP\s+\d+/ } #- accept ZIP 100, untested for bigger ZIP drive.
sub isJazzDrive { $_[0]{info} =~ /\bJAZZ?\b/i } #- accept "iomega jaz 1GB"
sub isLS120Drive { $_[0]{info} =~ /LS-?120|144MB/ }
-sub isRemovableUsb { $_[0]{usb_media_type} && index($_[0]{usb_media_type}, 'Mass Storage') == 0 && usb2removable($_[0]) }
-sub isKeyUsb { $_[0]{usb_media_type} && index($_[0]{usb_media_type}, 'Mass Storage') == 0 && $_[0]{media_type} eq 'hd' }
+sub isRemovableUsb { $_[0]{usb_media_type} && begins_with($_[0]{usb_media_type}, 'Mass Storage') && usb2removable($_[0]) }
+sub isKeyUsb { $_[0]{usb_media_type} && begins_with($_[0]{usb_media_type}, 'Mass Storage') && $_[0]{media_type} eq 'hd' }
sub isFloppyUsb { $_[0]{usb_driver} && $_[0]{usb_driver} eq 'Removable:floppy' }
sub isRemovableDrive {
my ($e) = @_;
- isZipDrive($e) || isLS120Drive($e) || $e->{media_type} && $e->{media_type} eq 'fd' || isRemovableUsb($e) || $e->{usb_media_type} && index($e->{usb_media_type}, 'Mass Storage|Floppy (UFI)') == 0;
+ isZipDrive($e) || isLS120Drive($e)
+ || $e->{media_type} && $e->{media_type} eq 'fd'
+ || isRemovableUsb($e)
+ || $e->{usb_media_type} && begins_with($e->{usb_media_type}, 'Mass Storage|Floppy (UFI)');
}
sub getSCSI_24() {