From 51fd51c2f560620d0e5c73a824d7677661f9c385 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 5 Jul 2004 05:58:27 +0000 Subject: create rationalize_options() and use it (bugzilla #3525) more checks should be done in this function, and used at more places (but where?) --- perl-install/fs.pm | 17 +++++++++++++++-- perl-install/fsedit.pm | 3 ++- 2 files changed, 17 insertions(+), 3 deletions(-) (limited to 'perl-install') diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 148f6cf23..06a864f25 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -483,6 +483,19 @@ user,exec,dev,suid )."), ); } + +sub rationalize_options { + my ($part) = @_; + + my ($options, $unknown) = mount_options_unpack($part); + + if (!isThisFs('reiserfs', $part)) { + $options->{notail} = 0; + } + + mount_options_pack($part, $options, $unknown); +} + sub set_default_options { my ($part, %opts) = @_; #- opts are: useSupermount security iocharset codepage @@ -540,8 +553,6 @@ sub set_default_options { } if (isThisFs('reiserfs', $part)) { $options->{notail} = 1; - } else { - $options->{notail} = 0; } if (isLoopback($part) && !isSwap($part)) { #- no need for loop option for swap files $options->{loop} = 1; @@ -561,6 +572,8 @@ sub set_default_options { } mount_options_pack($part, $options, $unknown); + + rationalize_options($part); } sub set_all_default_options { diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm index 921d96d63..89e999b01 100644 --- a/perl-install/fsedit.pm +++ b/perl-install/fsedit.pm @@ -771,7 +771,8 @@ sub change_type { $part->{mntpoint} = '' if isRawLVM({ type => $type }) || isRawRAID({ type => $type }); $part->{type} = $type; $part->{notFormatted} = 1; - $part->{isFormatted} = 0; + $part->{isFormatted} = 0; + fs::rationalize_options($part); } sub rescuept($) { -- cgit v1.2.1