summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_gtk.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-12-09 00:52:32 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-12-09 00:52:32 +0000
commitd59b27d5fcc346d96072ed0edb88cda0223be084 (patch)
treef605bc19591d3cf23d372a5ace6c70fbe367a620 /perl-install/install_steps_gtk.pm
parent1934b3123c81c2ccb425626aa61ed29e38780ddf (diff)
downloaddrakx-backup-do-not-use-d59b27d5fcc346d96072ed0edb88cda0223be084.tar
drakx-backup-do-not-use-d59b27d5fcc346d96072ed0edb88cda0223be084.tar.gz
drakx-backup-do-not-use-d59b27d5fcc346d96072ed0edb88cda0223be084.tar.bz2
drakx-backup-do-not-use-d59b27d5fcc346d96072ed0edb88cda0223be084.tar.xz
drakx-backup-do-not-use-d59b27d5fcc346d96072ed0edb88cda0223be084.zip
no_comment
Diffstat (limited to 'perl-install/install_steps_gtk.pm')
-rw-r--r--perl-install/install_steps_gtk.pm32
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}})) {