summaryrefslogtreecommitdiffstats
path: root/perl-install/diskdrake/interactive.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-11 00:39:27 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-11 00:39:27 +0000
commitd346fadc4e4b6514a143380d1a5b41ea98bced30 (patch)
treebc9a3d848fb43a8aae7f4514a26ac415a9040368 /perl-install/diskdrake/interactive.pm
parent7df41f293b9f5225f52cf3c5827788aaaabdc083 (diff)
downloaddrakx-d346fadc4e4b6514a143380d1a5b41ea98bced30.tar
drakx-d346fadc4e4b6514a143380d1a5b41ea98bced30.tar.gz
drakx-d346fadc4e4b6514a143380d1a5b41ea98bced30.tar.bz2
drakx-d346fadc4e4b6514a143380d1a5b41ea98bced30.tar.xz
drakx-d346fadc4e4b6514a143380d1a5b41ea98bced30.zip
(part_possible_actions) fix resizing LVs (mga#4666)
(is_LVM_resizable) introduce a real function instead of a "macro" else LVM_resizable got expanded as: member($part->{fs_type}, qw(btrfs ext3 ext4 reiserfs xfs)) then as: member($part->{fs_type}, qw(btrfs($part) ext3 ext4($part) reiserfs xfs)) commit r2781 ("sort") "brokes" ext4 by shifting it place in list by one (but ext3 would have failed)
Diffstat (limited to 'perl-install/diskdrake/interactive.pm')
-rw-r--r--perl-install/diskdrake/interactive.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index 46288d717..666e7b3a9 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -395,6 +395,10 @@ sub Hd_info {
# per-part actions
################################################################################
+sub is_LVM_resizable {
+ my ($part) = @_;
+ member($part->{fs_type}, qw(btrfs ext3 ext4 reiserfs xfs));
+}
sub part_possible_actions {
my ($_in, $hd, $part, $all_hds) = @_;
$part or return;
@@ -405,7 +409,7 @@ sub part_possible_actions {
N_("Type") => '!isBusy && $::expert && (!readonly || $part->{pt_type} == 0x83)',
N_("Options") => '!isSwap($part) && !isNonMountable && $::expert',
N_("Label") => '!isNonMountable && $::expert && fs::format::canEditLabel($part)',
- N_("Resize") => '!isBusy && !readonly && !isSpecial || isLVM($hd) && LVM_resizable',
+ N_("Resize") => '!isBusy && !readonly && !isSpecial || isLVM($hd) && is_LVM_resizable',
N_("Format") => '!isBusy && !isRawLVM && !isPartOfLVM && (!readonly && ($::expert || $::isStandalone) || fs::type::isRawLUKS($part))',
N_("Mount") => '!isBusy && (hasMntpoint || isSwap) && maybeFormatted && ($::expert || $::isStandalone)',
N_("Add to RAID") => '!isBusy && isRawRAID && (!isSpecial || isRAID)',
@@ -424,7 +428,6 @@ sub part_possible_actions {
my %macros = (
readonly => '$hd->{readonly}',
hasMntpoint => '$part->{mntpoint}',
- LVM_resizable => 'member($part->{fs_type}, qw(btrfs ext3 ext4 reiserfs xfs))',
canModifyRAID => 'isPartOfRAID($part) && !isMounted(fs::get::device2part($part->{raid}, $all_hds->{raids}))',
);
if (isEmpty($part)) {