diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-07-27 10:31:34 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-07-27 10:31:34 +0000 |
commit | 0306ad0100b9d40606d723706f909438a27dfac1 (patch) | |
tree | 232eab774506632a3796a5a36cf09771aa614e64 /perl-install/install_interactive.pm | |
parent | 54a662b712a584c66a9f5762d264cce50acbb6ab (diff) | |
download | drakx-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_interactive.pm')
-rw-r--r-- | perl-install/install_interactive.pm | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/perl-install/install_interactive.pm b/perl-install/install_interactive.pm index e86c10bb6..79d768736 100644 --- a/perl-install/install_interactive.pm +++ b/perl-install/install_interactive.pm @@ -4,8 +4,9 @@ use diagnostics; use strict; use common; -use partition_table qw(:types); +use partition_table; use partition_table::raw; +use fs::type; use detect_devices; use install_steps; use install_any; @@ -107,7 +108,7 @@ sub partitionWizardSolutions { push @wizlog, N("There is no existing partition to use"); } - my @fats = grep { isFat($_) } @$fstab; + my @fats = grep { $_->{fs_type} eq 'vfat' } @$fstab; fs::df($_) foreach @fats; if (my @ok_forloopback = sort { $b->{free} <=> $a->{free} } grep { $_->{free} > $min_linux + $min_swap + $min_freewin } @fats) { $solutions{loopback} = @@ -121,8 +122,8 @@ sub partitionWizardSolutions { { label => N("Swap partition size in MB: "), val => \$s_swap, min => $min_swap >> 11, max => $max_swap >> 11, type => 'range' }, ]) or return; push @{$part->{loopback}}, - { pt_type =>0x483, loopback_file => '/lnx4win/linuxsys.img', mntpoint => '/', size => $s_root << 11, loopback_device => $part, notFormatted => 1 }, - { pt_type => 0x82, loopback_file => '/lnx4win/swapfile', mntpoint => 'swap', size => $s_swap << 11, loopback_device => $part, notFormatted => 1 }; + { fs_type => 'ext3', loopback_file => '/lnx4win/linuxsys.img', mntpoint => '/', size => $s_root << 11, loopback_device => $part, notFormatted => 1 }, + { fs_type => 'swap', loopback_file => '/lnx4win/swapfile', mntpoint => 'swap', size => $s_swap << 11, loopback_device => $part, notFormatted => 1 }; fsedit::recompute_loopbacks($all_hds); 1; } ]; @@ -141,7 +142,7 @@ sub partitionWizardSolutions { }, \&partition_table::description, \@ok_for_resize_fat) or return; my $hd = fsedit::part2hd($part, $all_hds); my $resize_fat = eval { - my $pkg = isFat($part) ? do { + my $pkg = $part->{fs_type} eq 'vfat' ? do { require resize_fat::main; 'resize_fat::main'; } : do { @@ -192,9 +193,9 @@ When sure, press Ok."))) or return; } $o->ask_warn('', N("To ensure data integrity after resizing the partition(s), -filesystem checks will be run on your next boot into Windows(TM)")) if !isFat($part); +filesystem checks will be run on your next boot into Windows(TM)")) if $part->{fs_type} ne 'vfat'; - $part->{isFormatted} = 1; + set_isFormatted($part, 1); partition_table::will_tell_kernel($hd, resize => $part); #- down-sizing, write_partitions is not needed partition_table::adjust_local_extended($hd, $part); partition_table::adjust_main_extended($hd); |