diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-07-09 18:48:32 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-07-09 18:48:32 +0000 |
commit | 925e58d2b3b5fc4adeefcf9f7c3062ba5efde627 (patch) | |
tree | 29aed7d1e75323231b3b4623d84ce3c59a148cb8 /perl-install/fs.pm | |
parent | c8b361905dedbe2961b4e3c1670d5028eec12807 (diff) | |
download | drakx-925e58d2b3b5fc4adeefcf9f7c3062ba5efde627.tar drakx-925e58d2b3b5fc4adeefcf9f7c3062ba5efde627.tar.gz drakx-925e58d2b3b5fc4adeefcf9f7c3062ba5efde627.tar.bz2 drakx-925e58d2b3b5fc4adeefcf9f7c3062ba5efde627.tar.xz drakx-925e58d2b3b5fc4adeefcf9f7c3062ba5efde627.zip |
*** empty log message ***
Diffstat (limited to 'perl-install/fs.pm')
-rw-r--r-- | perl-install/fs.pm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 50cdec0fc..bf06934c2 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -39,7 +39,7 @@ sub check_mounted($) { open H, "/proc/swaps"; foreach (<F>, <G>, <H>) { foreach my $p (@$fstab) { - /$p->{device}\s/ and $p->{isMounted} = 1; + /$p->{device}\s/ and $p->{isMounted} = $p->{isFormatted} = 1; } } } @@ -62,16 +62,16 @@ sub format_ext2($;$) { my ($dev, $bad_blocks) = @_; my @options; - $dev =~ m,(rd|ida)/, and push @options, qw(-b 4096 -R stride=16); # For RAID only. + $dev =~ m,(rd|ida)/, and push @options, qw(-b 4096 -R stride=16); # For RAID only. $bad_blocks and push @options, "-c"; run_program::run("mke2fs", devices::make($dev), @options) or die "ext2 formatting of $dev failed"; } sub format_dos($;$) { - my ($dev, $bad_blocks) = @_; + my ($dev, $bad_blocks, @options) = @_; - run_program::run("mkdosfs", devices::make($dev), $bad_blocks ? "-c" : ()) or die "dos formatting of $dev failed"; + run_program::run("mkdosfs", devices::make($dev), @options, $bad_blocks ? "-c" : ()) or die "dos formatting of $dev failed"; } sub format_part($;$) { @@ -85,6 +85,8 @@ sub format_part($;$) { format_ext2($part->{device}, $bad_blocks); } elsif (isDos($part)) { format_dos($part->{device}, $bad_blocks); + } elsif (isWin($part)) { + format_dos($part->{device}, $bad_blocks, '-F', 32); } elsif (isSwap($part)) { swap::make($part->{device}, $bad_blocks); } else { @@ -139,7 +141,7 @@ sub mount_part($;$) { isSwap($part) ? swap::swapon($part->{device}) : mount(devices::make($part->{device}), ($prefix || '') . $part->{mntpoint}, type2fs($part->{type}), 0); - $part->{isMounted} = 1; + $part->{isMounted} = $part->{isFormatted} = 1; # assume that if mount works, partition is formatted } sub umount_part($;$) { |