From c2efef6d2f38a15bb0828c13b2171d17c44784b2 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Thu, 22 Apr 2010 13:49:47 +0000 Subject: Unify "Encrypted" display --- perl-install/diskdrake/hd_gtk.pm | 3 --- perl-install/diskdrake/interactive.pm | 11 +++++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm index 099abd1ac..d4029f326 100644 --- a/perl-install/diskdrake/hd_gtk.pm +++ b/perl-install/diskdrake/hd_gtk.pm @@ -238,9 +238,6 @@ sub per_entry_info_box { my $info; if ($entry) { $info = diskdrake::interactive::format_part_info(kind2hd($kind), $entry); - if($entry->{dmcrypt_name}) { - $info .= "\n" . N("Encrypted"); - } } elsif ($kind->{type} =~ /hd|lvm/) { $info = diskdrake::interactive::format_hd_info($kind->{val}); } diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index e3bdb402c..13dd760b0 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -1372,10 +1372,13 @@ sub format_part_info { $info .= N("Not formatted\n") if !$part->{isFormatted} && $part->{notFormatted}; $info .= N("Mounted\n") if $part->{isMounted}; $info .= N("RAID %s\n", $part->{raid}) if isPartOfRAID($part); - if (fs::type::isRawLUKS($part)) { - $info .= N("Encrypted") . ($part->{dm_active} && $part->{dm_name} ? N(" (mapped on %s)", $part->{dm_name}) : - $part->{dm_name} ? N(" (to map on %s)", $part->{dm_name}) : - N(" (inactive)")) . "\n"; + if (fs::type::isRawLUKS($part) || $part->{dmcrypt_name}) { + $info .= N("Encrypted"); + if (fs::type::isRawLUKS($part)) { + $info .= ($part->{dm_active} && $part->{dm_name} ? N(" (mapped on %s)", $part->{dm_name}) : + $part->{dm_name} ? N(" (to map on %s)", $part->{dm_name}) : + N(" (inactive)")) . "\n"; + } } if (isPartOfLVM($part)) { $info .= sprintf "LVM %s\n", $part->{lvm}; -- cgit v1.2.1