From d59b27d5fcc346d96072ed0edb88cda0223be084 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 9 Dec 1999 00:52:32 +0000 Subject: no_comment --- perl-install/install_steps_gtk.pm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'perl-install/install_steps_gtk.pm') diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm index 7afb02d4b..460835d18 100644 --- a/perl-install/install_steps_gtk.pm +++ b/perl-install/install_steps_gtk.pm @@ -245,6 +245,38 @@ sub selectLanguage { sub doPartitionDisks($$) { my ($o, $hds, $raid) = @_; + if (!$::isStandalone && fsedit::is_one_big_fat($hds)) { + #- wizard + my $min_linux = 600 << 11; + my $min_freewin = 100 << 11; + + my ($part) = fsedit::get_fstab(@{$o->{hds}}); + my $w = $o->wait_message(_("Resizing"), _("Computing fat filesystem bounds")); + my $resize_fat = eval { resize_fat::main->new($part->{device}, devices::make($part->{device})) }; + my $min_win = $resize_fat->min_size; + if (!$@ && $part->{size} > $min_linux + $min_freewin + $min_win && $o->ask_okcancel('', +_("TODO"))) { + my $oldsize = $part->{size}; + $hds->[0]{isDirty} = $hds->[0]{needKernelReread} = 1; + $part->{size} -= $min_linux; + partition_table::adjustEnd($hds->[0], $part); + + local *log::l = sub { $w->set(join(' ', @_)) }; + eval { $resize_fat->resize($part->{size}) }; + if ($@) { + $part->{size} = $oldsize; + $o->ask_warn('', _("Automatic resizing failed")); + } else { + $part->{isFormatted} = 1; + eval { fsedit::auto_allocate($hds, $o->{partitions}) }; + if (!$@) { + partition_table::write($hds->[0]) unless $::testing; + return; + } + } + } + } + while (1) { diskdrake::main($hds, $raid, interactive_gtk->new, $o->{partitions}); if (!grep { isSwap($_) } fsedit::get_fstab(@{$o->{hds}})) { -- cgit v1.2.1