From b6d4a46002270eaa64708ff8bdc7121ce6fd6fdb Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 17 Jan 2002 19:29:49 +0000 Subject: better error message when auto allocate doesn't do anything --- perl-install/fsedit.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'perl-install') diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm index 449893e8b..91de6a0ff 100644 --- a/perl-install/fsedit.pm +++ b/perl-install/fsedit.pm @@ -533,12 +533,20 @@ sub auto_allocate { my ($all_hds, $suggestions) = @_; my $before = listlength(fsedit::get_all_fstab($all_hds)); - allocatePartitions($all_hds, $suggestions || $suggestions{simple}); + my $suggestions_ = $suggestions || $suggestions{simple}; + allocatePartitions($all_hds, $suggestions_); auto_allocate_raids($all_hds, $suggestions) if $suggestions; partition_table::assign_device_numbers($_) foreach @{$all_hds->{hds}}; - $before != listlength(fsedit::get_all_fstab($all_hds)); + if ($before == listlength(fsedit::get_all_fstab($all_hds))) { + # find out why auto_allocate failed + if (my @l = grep { !has_mntpoint($_->{mntpoint}, $all_hds) } @$suggestions_) { + die _("Not enough free space for auto-allocating"); + } else { + die _("Nothing to do"); + } + } } sub auto_allocate_raids { -- cgit v1.2.1