diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-01-07 13:22:28 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-01-07 13:22:28 +0000 |
commit | c2f200920f04dba0874c054038770a91a71fbba5 (patch) | |
tree | 7448485cea94afcd511535b592b1f061c543f3b9 /perl-install/detect_devices.pm | |
parent | 0a813b0ea3c7c30ca81e79b6303f5141e95fee4b (diff) | |
download | drakx-backup-do-not-use-c2f200920f04dba0874c054038770a91a71fbba5.tar drakx-backup-do-not-use-c2f200920f04dba0874c054038770a91a71fbba5.tar.gz drakx-backup-do-not-use-c2f200920f04dba0874c054038770a91a71fbba5.tar.bz2 drakx-backup-do-not-use-c2f200920f04dba0874c054038770a91a71fbba5.tar.xz drakx-backup-do-not-use-c2f200920f04dba0874c054038770a91a71fbba5.zip |
use "if any" instead of "if grep", and various other occurences of "any", "every", "partition"
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r-- | perl-install/detect_devices.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index d4221ae1c..aaf375b86 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -113,7 +113,7 @@ sub get_sys_cdrom_info { @drives_order = map { s/^sr/scd/; my $dev = $_; - first(grep { $_->{device} eq $dev } @drives); + find { $_->{device} eq $dev } @drives; } @l; } else { my $capacity; @@ -160,7 +160,7 @@ sub get_usb_storage_info { @informed or return; foreach my $usb (usb_probe()) { - if (my ($e) = grep { $_->{usb_vendor} == $usb->{vendor} && $_->{usb_id} == $usb->{id} } @informed) { + if (my $e = find { $_->{usb_vendor} == $usb->{vendor} && $_->{usb_id} == $usb->{id} } @informed) { $e->{"usb_$_"} = $usb->{$_} foreach keys %$usb; } } @@ -731,7 +731,7 @@ sub raidAutoStartRaidtab { #- (choosing any inactive md) raid::inactivate_all(); foreach (@parts) { - my ($nb) = grep { !raid::is_active("md$_") } 0..7; + my $nb = find { !raid::is_active("md$_") } 0..7; output("/tmp/raidtab", "raiddev /dev/md$nb\n device " . devices::make($_->{device}) . "\n"); run_program::run('raidstart', '-c', "/tmp/raidtab", devices::make("md$nb")); } |