summaryrefslogtreecommitdiffstats
path: root/perl-install/fs
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-09-20 09:46:40 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-09-20 09:46:40 +0000
commit651a256ee82c18578c3f551e89d3bcadaf68ab43 (patch)
treeabe7390dbcf53aa1d6028e07eaf3d633fe70c9b7 /perl-install/fs
parent67ac3075349e74f4984ea04d19569c19ca1efa70 (diff)
downloaddrakx-651a256ee82c18578c3f551e89d3bcadaf68ab43.tar
drakx-651a256ee82c18578c3f551e89d3bcadaf68ab43.tar.gz
drakx-651a256ee82c18578c3f551e89d3bcadaf68ab43.tar.bz2
drakx-651a256ee82c18578c3f551e89d3bcadaf68ab43.tar.xz
drakx-651a256ee82c18578c3f551e89d3bcadaf68ab43.zip
- add field {part_number} for partitions
(handle it in subpart_from_wild_device_name(), partition_table::read()) - create migrate_device_names() to handle the change of device names when changing kernel&modules (eg: hde->hda or hda->sda) - change prototype of install_any::use_root_part() (prefix is dropped, optional $in is added) - create fs::type::can_be_this_fs_type() and use it - create devices::part_number() and devices::part_prefix() and use them
Diffstat (limited to 'perl-install/fs')
-rw-r--r--perl-install/fs/mount_options.pm4
-rw-r--r--perl-install/fs/type.pm5
2 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/fs/mount_options.pm b/perl-install/fs/mount_options.pm
index c7baa4e7b..b4890e877 100644
--- a/perl-install/fs/mount_options.pm
+++ b/perl-install/fs/mount_options.pm
@@ -195,7 +195,7 @@ sub set_default {
if ($part->{fs_type} eq 'smbfs') {
add2hash($options, { 'username=' => '%' }) if !$options->{'credentials='};
}
- if (member('vfat', split(':', $part->{fs_type})) || $part->{fs_type} eq 'auto') {
+ if (fs::type::can_be_this_fs_type($part, 'vfat')) {
put_in_hash($options, {
users => 1, noexec => 0,
@@ -211,7 +211,7 @@ sub set_default {
'umask=0' => $opts{security} < 3, 'umask=0022' => $opts{security} < 4,
});
}
- if (member('iso9660', split(':', $part->{fs_type})) || $part->{fs_type} eq 'auto') {
+ if (fs::type::can_be_this_fs_type($part, 'iso9660')) {
put_in_hash($options, { user => 1, noexec => 0, 'iocharset=' => $opts{iocharset} });
}
if ($part->{fs_type} eq 'reiserfs') {
diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm
index 0b361b8f2..70aace58f 100644
--- a/perl-install/fs/type.pm
+++ b/perl-install/fs/type.pm
@@ -341,6 +341,11 @@ sub isMounted { $_[0]{isMounted} }
sub isBusy { isMounted($_[0]) || isPartOfRAID($_[0]) || isPartOfLVM($_[0]) || isPartOfLoopback($_[0]) }
sub isSpecial { isRAID($_[0]) || isLVM($_[0]) || isLoopback($_[0]) || isUBD($_[0]) }
+sub can_be_this_fs_type {
+ my ($part, $fs_type) = @_;
+ $part->{fs_type} && ($part->{fs_type} eq 'auto' || member($fs_type, split(':', $part->{fs_type})));
+}
+
sub maybeFormatted {
my ($part) = @_;
$part->{isFormatted} || !$part->{notFormatted} && !$part->{bad_fs_type_magic};