summaryrefslogtreecommitdiffstats
path: root/perl-install/diskdrake/interactive.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-01-07 13:22:28 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-01-07 13:22:28 +0000
commitc2f200920f04dba0874c054038770a91a71fbba5 (patch)
tree7448485cea94afcd511535b592b1f061c543f3b9 /perl-install/diskdrake/interactive.pm
parent0a813b0ea3c7c30ca81e79b6303f5141e95fee4b (diff)
downloaddrakx-c2f200920f04dba0874c054038770a91a71fbba5.tar
drakx-c2f200920f04dba0874c054038770a91a71fbba5.tar.gz
drakx-c2f200920f04dba0874c054038770a91a71fbba5.tar.bz2
drakx-c2f200920f04dba0874c054038770a91a71fbba5.tar.xz
drakx-c2f200920f04dba0874c054038770a91a71fbba5.zip
use "if any" instead of "if grep", and various other occurences of "any", "every", "partition"
Diffstat (limited to 'perl-install/diskdrake/interactive.pm')
-rw-r--r--perl-install/diskdrake/interactive.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index e3055ca2a..04215eb07 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -798,9 +798,8 @@ sub RemoveFromLVM {
my ($_in, $_hd, $part, $all_hds) = @_;
my $lvms = $all_hds->{lvms};
isPartOfLVM($part) or die;
- my ($lvm) = grep { $_->{VG_name} eq $part->{lvm} } @$lvms;
- lvm::vg_destroy($lvm);
- @$lvms = grep { $_ != $lvm } @$lvms;
+ (my $lvm, $lvms) = partition { $_->{VG_name} eq $part->{lvm} } @$lvms;
+ lvm::vg_destroy($lvm->[0]);
}
sub ModifyRAID {
my ($in, $_hd, $part, $all_hds) = @_;
@@ -920,7 +919,7 @@ sub Options {
sub is_part_existing {
my ($part, $all_hds) = @_;
- $part && grep { fsedit::is_same_part($part, $_) } fsedit::get_all_fstab_and_holes($all_hds);
+ $part && any { fsedit::is_same_part($part, $_) } fsedit::get_all_fstab_and_holes($all_hds);
}
sub modifyRAID {