summaryrefslogtreecommitdiffstats
path: root/perl-install/fsedit.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-03-21 14:51:47 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-03-21 14:51:47 +0000
commit5d26d0cff18a0899fc14c7a8a0898203d927c860 (patch)
treed12f135afa1355a9a56898fc1eb16dafba4aa6f8 /perl-install/fsedit.pm
parent8a7b93cfc23f2cef362ae8930896a9887083be4e (diff)
downloaddrakx-backup-do-not-use-5d26d0cff18a0899fc14c7a8a0898203d927c860.tar
drakx-backup-do-not-use-5d26d0cff18a0899fc14c7a8a0898203d927c860.tar.gz
drakx-backup-do-not-use-5d26d0cff18a0899fc14c7a8a0898203d927c860.tar.bz2
drakx-backup-do-not-use-5d26d0cff18a0899fc14c7a8a0898203d927c860.tar.xz
drakx-backup-do-not-use-5d26d0cff18a0899fc14c7a8a0898203d927c860.zip
- diskdrake:
o fix setting mount point of a /dev/mdX (#39142) (regression introduced in 10.8)
Diffstat (limited to 'perl-install/fsedit.pm')
-rw-r--r--perl-install/fsedit.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 2e8f05b2c..f2c363127 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -345,12 +345,13 @@ sub suggest_part {
fs::type::set_pt_type($_, $_->{pt_type}) if !exists $_->{fs_type};
}
- my $hd_size = fs::get::part2hd($part, $all_hds)->{totalsectors};
+ my $hd = fs::get::part2hd($part, $all_hds);
+ my $hd_size = $hd && $hd->{totalsectors}; # nb: no $hd if $part is /dev/mdX
my $has_swap = any { isSwap($_) } fs::get::fstab($all_hds);
my @local_suggestions =
grep { !$_->{mntpoint} && !$_->{VG_name} || !fs::get::has_mntpoint($_->{mntpoint}, $all_hds) || isSwap($_) && !$has_swap }
- grep { !$_->{min_hd_size} || $_->{min_hd_size} <= $hd_size }
+ grep { !$_->{min_hd_size} || !$hd_size || $_->{min_hd_size} <= $hd_size }
grep { !$_->{hd} || $_->{hd} eq $part->{rootDevice} }
@$suggestions;