From 8c57553925621c1591e422d9ea40449ca828d1b2 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 28 Oct 2009 14:25:18 +0000 Subject: set total minimum linux size in part min_linux --- perl-install/fs/partitioning_wizard.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/perl-install/fs/partitioning_wizard.pm b/perl-install/fs/partitioning_wizard.pm index f5c466f77..3f1050e8b 100644 --- a/perl-install/fs/partitioning_wizard.pm +++ b/perl-install/fs/partitioning_wizard.pm @@ -132,16 +132,18 @@ sub partitionWizardSolutions { log::l("The FAT resizer is unable to get minimal size for $part->{device} partition %s", formatError($@)); undef $part; } else { + my $min_linux_all = $min_linux + $min_swap; #- make sure that even after normalizing the size to cylinder boundaries, the minimun will be saved, #- this save at least a cylinder (less than 8Mb). $min_win += partition_table::raw::cylinder_size($hd); - if ($part->{size} <= $min_linux + $min_swap + $min_win) { + if ($part->{size} <= $min_linux_all + $min_win) { # die N("Your Microsoft Windows® partition is too fragmented. Please reboot your computer under Microsoft Windows®, run the ``defrag'' utility, then restart the Mandriva Linux installation."); undef $part; } else { $part->{resize_fat} = $resize_fat; $part->{min_win} = $min_win; + $part->{min_linux} = $min_linux_all; } } } @@ -162,7 +164,7 @@ sub partitionWizardSolutions { my $resize_fat = $part->{resize_fat}; my $hd = fs::get::part2hd($part, $all_hds); if (!$in->isa('interactive::gtk')) { - $part->{size} > $min_linux + $min_swap + $part->{min_win} or die N("Your Microsoft Windows® partition is too fragmented. Please reboot your computer under Microsoft Windows®, run the ``defrag'' utility, then restart the Mandriva Linux installation."); + $part->{size} > $part->{min_linux} + $part->{min_win} or die N("Your Microsoft Windows® partition is too fragmented. Please reboot your computer under Microsoft Windows®, run the ``defrag'' utility, then restart the Mandriva Linux installation."); } $in->ask_okcancel('', formatAlaTeX( #-PO: keep the double empty lines between sections, this is formatted a la LaTeX @@ -181,7 +183,7 @@ When sure, press %s.", N("Next")))) or return; if (!$in->isa('interactive::gtk')) { my $mb_size = to_Mb($part->{size}); $in->ask_from(N("Partitionning"), N("Which size do you want to keep for Microsoft Windows® on partition %s?", partition_table::description($part)), [ - { label => N("Size"), val => \$mb_size, min => to_Mb($part->{min_win}), max => to_Mb($part->{size} - $min_linux - $min_swap), type => 'range' }, + { label => N("Size"), val => \$mb_size, min => to_Mb($part->{min_win}), max => to_Mb($part->{size} - $part->{min_linux}), type => 'range' }, ]) or return; $part->{size} = from_Mb($mb_size, $part->{min_win}, $part->{size}); } else { -- cgit v1.2.1