diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-12-09 00:52:32 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-12-09 00:52:32 +0000 |
commit | d59b27d5fcc346d96072ed0edb88cda0223be084 (patch) | |
tree | f605bc19591d3cf23d372a5ace6c70fbe367a620 /perl-install/install_steps_gtk.pm | |
parent | 1934b3123c81c2ccb425626aa61ed29e38780ddf (diff) | |
download | drakx-d59b27d5fcc346d96072ed0edb88cda0223be084.tar drakx-d59b27d5fcc346d96072ed0edb88cda0223be084.tar.gz drakx-d59b27d5fcc346d96072ed0edb88cda0223be084.tar.bz2 drakx-d59b27d5fcc346d96072ed0edb88cda0223be084.tar.xz drakx-d59b27d5fcc346d96072ed0edb88cda0223be084.zip |
no_comment
Diffstat (limited to 'perl-install/install_steps_gtk.pm')
-rw-r--r-- | perl-install/install_steps_gtk.pm | 32 |
1 files changed, 32 insertions, 0 deletions
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}})) { |