diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-07-22 02:40:13 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-07-22 02:40:13 +0000 |
commit | ebf02b59da8d58744166071a18f253c9a0d34e25 (patch) | |
tree | adc767035b91b8ffd94e6d1fbc5b3e218bb4f9d8 | |
parent | 03ff5f3c5f6b7911b1cd4a10ce6f956124e997d5 (diff) | |
download | drakx-ebf02b59da8d58744166071a18f253c9a0d34e25.tar drakx-ebf02b59da8d58744166071a18f253c9a0d34e25.tar.gz drakx-ebf02b59da8d58744166071a18f253c9a0d34e25.tar.bz2 drakx-ebf02b59da8d58744166071a18f253c9a0d34e25.tar.xz drakx-ebf02b59da8d58744166071a18f253c9a0d34e25.zip |
shorter and faster
-rw-r--r-- | perl-install/fsedit.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm index ce5c0cdee..0c5d8fe4b 100644 --- a/perl-install/fsedit.pm +++ b/perl-install/fsedit.pm @@ -221,17 +221,19 @@ sub hds { foreach partition_table::get_normal_parts($hd); } + my @parts = partition_table::get_normal_parts($hd); + # special case for Various type - $_->{pt_type} = typeOfPart($_->{device}) || 0x100 foreach grep { $_->{pt_type} == 0x100 } partition_table::get_normal_parts($hd); + $_->{pt_type} = typeOfPart($_->{device}) || 0x100 foreach grep { $_->{pt_type} == 0x100 } @parts; #- special case for type overloading (eg: reiserfs is 0x183) - foreach (grep { isExt2($_) || $_->{pt_type} == 0x7 || $_->{pt_type} == 0x17 } partition_table::get_normal_parts($hd)) { + foreach (grep { isExt2($_) || $_->{pt_type} == 0x7 || $_->{pt_type} == 0x17 } @parts) { my $wanted_pt_type = $_->{pt_type} == 0x17 ? 0x7 : $_->{pt_type}; my $pt_type = typeOfPart($_->{device}); $_->{pt_type} = $pt_type if ($pt_type & 0xff) == $wanted_pt_type || $pt_type && $hd->isa('partition_table::gpt'); } - foreach (partition_table::get_normal_parts($hd)) { + foreach (@parts) { my $label = member(type2fs($_), qw(ext2 ext3)) ? c::get_ext2_label(devices::make($_->{device})) : @@ -240,7 +242,7 @@ sub hds { } if ($hd->{usb_media_type}) { - $_->{is_removable} = 1 foreach partition_table::get_normal_parts($hd); + $_->{is_removable} = 1 foreach @parts; } push @hds, $hd; |