summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-07-22 07:05:08 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-07-22 07:05:08 +0000
commita956ee06bc7a7370b16b4ca3ed1a0c888e93a39c (patch)
treeccb0726a187c03118a293a163cf8247762d8866a /perl-install/detect_devices.pm
parent094a2c8040564663e9fcf5f1db7c95a1b2f3476d (diff)
downloaddrakx-backup-do-not-use-a956ee06bc7a7370b16b4ca3ed1a0c888e93a39c.tar
drakx-backup-do-not-use-a956ee06bc7a7370b16b4ca3ed1a0c888e93a39c.tar.gz
drakx-backup-do-not-use-a956ee06bc7a7370b16b4ca3ed1a0c888e93a39c.tar.bz2
drakx-backup-do-not-use-a956ee06bc7a7370b16b4ca3ed1a0c888e93a39c.tar.xz
drakx-backup-do-not-use-a956ee06bc7a7370b16b4ca3ed1a0c888e93a39c.zip
simplify
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index da84a17f4..ec1db195a 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -175,15 +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} && 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 isRemovableUsb { begins_with($_[0]{usb_media_type} || '', 'Mass Storage') && usb2removable($_[0]) }
+sub isKeyUsb { 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} && begins_with($e->{usb_media_type}, 'Mass Storage|Floppy (UFI)');
+ || begins_with($e->{usb_media_type} || '', 'Mass Storage|Floppy (UFI)');
}
sub getSCSI_24() {