summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-07-27 10:31:34 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-07-27 10:31:34 +0000
commit0306ad0100b9d40606d723706f909438a27dfac1 (patch)
tree232eab774506632a3796a5a36cf09771aa614e64 /perl-install/install_any.pm
parent54a662b712a584c66a9f5762d264cce50acbb6ab (diff)
downloaddrakx-backup-do-not-use-0306ad0100b9d40606d723706f909438a27dfac1.tar
drakx-backup-do-not-use-0306ad0100b9d40606d723706f909438a27dfac1.tar.gz
drakx-backup-do-not-use-0306ad0100b9d40606d723706f909438a27dfac1.tar.bz2
drakx-backup-do-not-use-0306ad0100b9d40606d723706f909438a27dfac1.tar.xz
drakx-backup-do-not-use-0306ad0100b9d40606d723706f909438a27dfac1.zip
- add field {fs_type} partially replacing {pt_type}
{pt_type} is always a number, {fs_type} is always a string - introduce set_isFormatted() (to ensure {notFormatted} but also {fs_type_from_magic} and {bad_fs_type_magic} are updated) - don't use 0x483 for ext3 anymore (same for reiserfs...), the type_name gives both a pt_type and a fs_type - many accessors from partition_table removed (type2fs(), fs2pt_type()) - remove isThisFs() (not useful anymore since we can use directly {fs_type}) - remove isFat() (inline the function) - other isXXX() from partition_table are moved to fs::type - part2name() is now fs::type::part2type_name - name2pt_type() is now fs::type::type_name2subpart() - partition_table::important_types() is now fs::type::type_names() - fsedit::typeOfPart() is now fs::type::fs_type_from_magic() - no need to truncate type_name since they are shorter
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm14
1 files changed, 8 insertions, 6 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 66511f2e1..fdfe55111 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -16,8 +16,8 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK $boot_medium $current_medium $asked_med
use MDK::Common::System;
use common;
use run_program;
-use partition_table qw(:types);
-use partition_table::raw;
+use fs::type;
+use partition_table;
use devices;
use fsedit;
use modules;
@@ -801,7 +801,7 @@ sub g_auto_install {
require pkgs;
$o->{default_packages} = pkgs::selected_leaves($::o->{packages});
- my @fields = qw(mntpoint pt_type size);
+ my @fields = qw(mntpoint fs_type size);
$o->{partitions} = [ map { my %l; @l{@fields} = @$_{@fields}; \%l } grep { $_->{mntpoint} } @{$::o->{fstab}} ];
exists $::o->{$_} and $o->{$_} = $::o->{$_} foreach qw(locale authentication mouse netc timezone superuser intf keyboard users partitioning isUpgrade manualFstab nomouseprobe crypto security security_user libsafe netcnx useSupermount autoExitInstall X services); #- TODO modules bootloader
@@ -988,7 +988,9 @@ sub loadO {
#- handle backward compatibility for things that changed
foreach (@{$o->{partitions} || []}, @{$o->{manualFstab} || []}) {
- $_->{pt_type} ||= $_->{type};
+ if (my $pt_type = delete $_->{type}) {
+ fs::type::set_pt_type($_, $pt_type);
+ }
}
$o;
@@ -1118,7 +1120,7 @@ sub getHds {
$o->{fstab} = [ fsedit::get_really_all_fstab($all_hds) ];
fs::merge_info_from_mtab($o->{fstab});
- my @win = grep { isFat_or_NTFS($_) && isFat_or_NTFS({ pt_type => fsedit::typeOfPart($_->{device}) }) } @{$o->{fstab}};
+ my @win = grep { isFat_or_NTFS($_) && maybeFormatted($_) } @{$o->{fstab}};
log::l("win parts: ", join ",", map { $_->{device} } @win) if @win;
if (@win == 1) {
#- Suggest /boot/efi on ia64.
@@ -1130,7 +1132,7 @@ sub getHds {
}
}
- my @sunos = grep { isSunOS($_) && part2name($_) =~ /root/i } @{$o->{fstab}}; #- take only into account root partitions.
+ my @sunos = grep { $_->{pt_type} == 2 } @{$o->{fstab}}; #- take only into account root partitions.
if (@sunos) {
my $v = '';
map { $_->{mntpoint} = $_->{unsafeMntpoint} = "/mnt/sunos" . ($v && ++$v) } @sunos;