summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-07-22 07:14:29 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-07-22 07:14:29 +0000
commit8f74cf0f591abf4c9ff4186b5d24c72f4f9b1900 (patch)
tree1756def893adac56e8f8b59ed5c3a95ef6fa0b05 /perl-install
parenta956ee06bc7a7370b16b4ca3ed1a0c888e93a39c (diff)
downloaddrakx-backup-do-not-use-8f74cf0f591abf4c9ff4186b5d24c72f4f9b1900.tar
drakx-backup-do-not-use-8f74cf0f591abf4c9ff4186b5d24c72f4f9b1900.tar.gz
drakx-backup-do-not-use-8f74cf0f591abf4c9ff4186b5d24c72f4f9b1900.tar.bz2
drakx-backup-do-not-use-8f74cf0f591abf4c9ff4186b5d24c72f4f9b1900.tar.xz
drakx-backup-do-not-use-8f74cf0f591abf4c9ff4186b5d24c72f4f9b1900.zip
- isRemovableDrive() removed, partially replaced with may_be_a_hd()
- the main difference is that isRemovableDrive() checked isRemovableUsb() whereas may_be_a_hd() allows more usb removable drives (esp. memory cards and some usb keys declared as memory cards (0x0c76 0x0005))
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/detect_devices.pm13
1 files changed, 7 insertions, 6 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index ec1db195a..0ecd3c79f 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -34,7 +34,7 @@ sub get() {
getIDE(), getSCSI(), getDAC960(), getCompaqSmartArray(), getATARAID();
}
-sub hds() { grep { $_->{media_type} eq 'hd' && !isRemovableDrive($_) } get() }
+sub hds() { grep { may_be_a_hd($_) } get() }
sub tapes() { grep { $_->{media_type} eq 'tape' } get() }
sub cdroms() { grep { $_->{media_type} eq 'cdrom' } get() }
sub burners() { grep { isBurner($_) } cdroms() }
@@ -178,12 +178,13 @@ sub isLS120Drive { $_[0]{info} =~ /LS-?120|144MB/ }
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 {
+sub may_be_a_hd {
my ($e) = @_;
- isZipDrive($e) || isLS120Drive($e)
- || $e->{media_type} && $e->{media_type} eq 'fd'
- || isRemovableUsb($e)
- || begins_with($e->{usb_media_type} || '', 'Mass Storage|Floppy (UFI)');
+ $e->{media_type} eq 'hd' && !(
+ isZipDrive($e)
+ || isLS120Drive($e)
+ || begins_with($e->{usb_media_type} || '', 'Mass Storage|Floppy (UFI)')
+ );
}
sub getSCSI_24() {