From c7c6053d6513768bc52100dae3e8a8b7ee035f8c Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 28 Jan 2008 13:04:34 +0000 Subject: - detect raid partitions based on either type 0xfd or vol_id detecting linux_raid_member (#35684) for this, introduce field {type_name} --- perl-install/fs/type.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'perl-install/fs/type.pm') diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm index 3d4bb6ffa..b7fef0771 100644 --- a/perl-install/fs/type.pm +++ b/perl-install/fs/type.pm @@ -196,7 +196,8 @@ sub type_names { sub type_name2subpart { my ($name) = @_; exists $type_name2fs_type{$name} && - { fs_type => $type_name2fs_type{$name}, pt_type => $type_name2pt_type{$name} }; + { type_name => $name, + fs_type => $type_name2fs_type{$name}, pt_type => $type_name2pt_type{$name} }; } sub part2type_name { @@ -308,8 +309,8 @@ sub isEmpty { !$_[0]{fs_type} && $_[0]{pt_type} == 0 } sub isEfi { arch() =~ /ia64/ && $_[0]{pt_type} == 0xef } sub isWholedisk { arch() =~ /^sparc/ && $_[0]{pt_type} == 5 } sub isExtended { arch() !~ /^sparc/ && ($_[0]{pt_type} == 5 || $_[0]{pt_type} == 0xf || $_[0]{pt_type} == 0x85) } -sub isRawLVM { $_[0]{pt_type} == 0x8e } -sub isRawRAID { $_[0]{pt_type} == 0xfd } +sub isRawLVM { $_[0]{pt_type} == 0x8e || $_[0]{type_name} eq 'Linux Logical Volume Manager' } +sub isRawRAID { $_[0]{pt_type} == 0xfd || $_[0]{type_name} eq 'Linux RAID' } sub isSwap { $_[0]{fs_type} eq 'swap' } sub isDos { arch() !~ /^sparc/ && ${{ 1 => 1, 4 => 1, 6 => 1 }}{$_[0]{pt_type}} } sub isFat_or_NTFS { member($_[0]{fs_type}, 'vfat', 'ntfs', 'ntfs-3g') } -- cgit v1.2.1