summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_interactive.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_steps_interactive.pm
parent54a662b712a584c66a9f5762d264cce50acbb6ab (diff)
downloaddrakx-0306ad0100b9d40606d723706f909438a27dfac1.tar
drakx-0306ad0100b9d40606d723706f909438a27dfac1.tar.gz
drakx-0306ad0100b9d40606d723706f909438a27dfac1.tar.bz2
drakx-0306ad0100b9d40606d723706f909438a27dfac1.tar.xz
drakx-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_steps_interactive.pm')
-rw-r--r--perl-install/install_steps_interactive.pm14
1 files changed, 8 insertions, 6 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 8be4fa5fe..6f0e0f68e 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -12,8 +12,8 @@ use vars qw(@ISA $new_bootstrap);
#- misc imports
#-######################################################################################
use common;
-use partition_table qw(:types);
-use partition_table::raw;
+use partition_table;
+use fs::type;
use install_steps;
use install_interactive;
use install_any;
@@ -286,7 +286,9 @@ sub doPartitionDisks {
log::l("creating bootstrap partition on drive /dev/$freepart->{hd}{device}, block $freepart->{start}");
$partition_table::mac::bootstrap_part = $freepart->{part};
log::l("bootstrap now at $partition_table::mac::bootstrap_part");
- fsedit::add($freepart->{hd}, { start => $freepart->{start}, size => 1 << 11, pt_type => 0x401, mntpoint => '' }, $o->{all_hds}, { force => 1, primaryOrExtended => 'Primary' });
+ my $p = { start => $freepart->{start}, size => 1 << 11, mntpoint => '' };
+ fs::type::set_pt_type($p, 0x401);
+ fsedit::add($freepart->{hd}, $p, $o->{all_hds}, { force => 1, primaryOrExtended => 'Primary' });
$new_bootstrap = 1;
} else {
$o->ask_warn('', N("No free space for 1MB bootstrap! Install will continue, but to boot your system, you'll need to create the bootstrap partition in DiskDrake"));
@@ -335,7 +337,7 @@ sub choosePartitionsToFormat {
({
text => partition_table::description($e), type => 'bool',
val => \$e->{toFormatTmp}
- }, if_(!isLoopback($_) && !isThisFs("reiserfs", $_) && !isThisFs("xfs", $_) && !isThisFs("jfs", $_), {
+ }, if_(!isLoopback($_) && !member($_->{fs_type}, 'reiserfs', 'xfs', 'jfs'), {
text => partition_table::description($e), type => 'bool', advanced => 1,
disabled => sub { !$e->{toFormatTmp} },
val => \$e->{toFormatCheck}
@@ -344,7 +346,7 @@ sub choosePartitionsToFormat {
#- ok now we can really set toFormat
foreach (@l) {
$_->{toFormat} = delete $_->{toFormatTmp};
- $_->{isFormatted} = 0;
+ set_isFormatted($_, 0);
}
}
@@ -1251,7 +1253,7 @@ sub miscellaneous {
require security::level;
security::level::level_choose($o, \$o->{security}, \$o->{libsafe}, \$o->{security_user});
- if ($o->{security} > 2 && find { isFat($_) } @{$o->{fstab}}) {
+ if ($o->{security} > 2 && find { $_->{fs_type} eq 'vfat' } @{$o->{fstab}}) {
$o->ask_okcancel('', N("In this security level, access to the files in the Windows partition is restricted to the administrator."))
or goto &miscellaneous;
}