summaryrefslogtreecommitdiffstats
path: root/perl-install/fs/type.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-18 17:00:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-18 17:00:11 +0000
commit562c8c525f7b9bf005c56e589623817a19e23438 (patch)
tree86a8d5a18b187918d962eb78bed852c75f0cded3 /perl-install/fs/type.pm
parent8d97f13366221db1ec0b8400dac8fb9c26180621 (diff)
downloaddrakx-backup-do-not-use-562c8c525f7b9bf005c56e589623817a19e23438.tar
drakx-backup-do-not-use-562c8c525f7b9bf005c56e589623817a19e23438.tar.gz
drakx-backup-do-not-use-562c8c525f7b9bf005c56e589623817a19e23438.tar.bz2
drakx-backup-do-not-use-562c8c525f7b9bf005c56e589623817a19e23438.tar.xz
drakx-backup-do-not-use-562c8c525f7b9bf005c56e589623817a19e23438.zip
- diskdrake:
o handle partitions encrypted with cryptsetup
Diffstat (limited to 'perl-install/fs/type.pm')
-rw-r--r--perl-install/fs/type.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm
index ab7689d30..102a60830 100644
--- a/perl-install/fs/type.pm
+++ b/perl-install/fs/type.pm
@@ -39,6 +39,7 @@ if_(arch() =~ /ppc/,
0x402 => 'hfs', 'Apple HFS Partition',
0x41 => '', 'PPC PReP Boot',
),
+ 0x83 => '', 'Encrypted',
],
non_fs_type => [
@@ -291,6 +292,8 @@ sub type_subpart_from_magic {
}->{$ids->{ID_FS_TYPE}};
$p = type_name2subpart($name) if $name;
+ } elsif ($ids->{ID_FS_USAGE} eq 'crypto') {
+ $p = type_name2subpart('Encrypted');
} elsif (my $fs_type = $ids->{ID_FS_TYPE}) {
$fs_type = 'ntfs-3g' if $fs_type eq 'ntfs';
$p = fs_type2subpart($fs_type) or log::l("unknown filesystem $fs_type returned by vol_id");
@@ -312,6 +315,7 @@ 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 || $_[0]{type_name} eq 'Linux Logical Volume Manager' }
sub isRawRAID { $_[0]{pt_type} == 0xfd || $_[0]{type_name} eq 'Linux RAID' }
+sub isRawLUKS { $_[0]{type_name} eq 'Encrypted' }
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') }
@@ -325,7 +329,7 @@ sub isOtherAvailableFS { isEfi($_[0]) || isFat_or_NTFS($_[0]) || member($_[0]{fs
sub isMountableRW { (isTrueFS($_[0]) || isOtherAvailableFS($_[0])) && $_[0]{fs_type} ne 'ntfs' }
sub cannotBeMountable {
my ($part) = @_;
- isRawRAID($part) || isRawLVM($part);
+ isRawRAID($part) || isRawLUKS($part) || isRawLVM($part);
}
sub isNonMountable {
my ($part) = @_;
@@ -340,7 +344,7 @@ sub isUBD { $_[0]{device} =~ /^ubd/ } #- should be always true during an $::uml_
sub isLVM { $_[0]{VG_name} || $_[0]{lv_name} }
sub isLoopback { defined $_[0]{loopback_file} }
sub isMounted { $_[0]{isMounted} }
-sub isBusy { isMounted($_[0]) || isPartOfRAID($_[0]) || isPartOfLVM($_[0]) || isPartOfLoopback($_[0]) }
+sub isBusy { isMounted($_[0]) || isPartOfRAID($_[0]) || isPartOfLVM($_[0]) || $_[0]{dm_active} || isPartOfLoopback($_[0]) }
sub isSpecial { isRAID($_[0]) || isLVM($_[0]) || isLoopback($_[0]) || isUBD($_[0]) }
#- not for partitions, but for hds: