diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-04-13 23:27:43 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-04-13 23:27:43 +0000 |
commit | 3f3ced984833bf1084447c1afd3cfc7d17d0838b (patch) | |
tree | d1c9b1884efe353b3fa5a165ca7f601dfa8c6ff5 /perl-install/partition_table.pm | |
parent | 21afb921cd71327cae09ec568f11e6f020a93229 (diff) | |
download | drakx-backup-do-not-use-3f3ced984833bf1084447c1afd3cfc7d17d0838b.tar drakx-backup-do-not-use-3f3ced984833bf1084447c1afd3cfc7d17d0838b.tar.gz drakx-backup-do-not-use-3f3ced984833bf1084447c1afd3cfc7d17d0838b.tar.bz2 drakx-backup-do-not-use-3f3ced984833bf1084447c1afd3cfc7d17d0838b.tar.xz drakx-backup-do-not-use-3f3ced984833bf1084447c1afd3cfc7d17d0838b.zip |
no_comment
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r-- | perl-install/partition_table.pm | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index 09790a2ec..167c3d435 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -2,12 +2,12 @@ package partition_table; use diagnostics; use strict; -use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @important_types @fields2save); +use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @important_types @important_types2 @fields2save); use Data::Dumper; @ISA = qw(Exporter); %EXPORT_TAGS = ( - types => [ qw(type2name type2fs name2type fs2type isExtended isExt2 isReiserfs isSwap isDos isWin isFat isPrimary isNfs isSupermount isRAID isHFS isNT isMountableRW isApplePartMap isLoopback) ], + types => [ qw(type2name type2fs name2type fs2type isExtended isExt2 isReiserfs isTrueFS isSwap isDos isWin isFat isPrimary isNfs isSupermount isRAID isHFS isNT isMountableRW isApplePartMap isLoopback) ], ); @EXPORT_OK = map { @$_ } values %EXPORT_TAGS; @@ -21,7 +21,8 @@ use partition_table_mac; use log; -@important_types = ('Linux native', 'ReiserFS', 'Linux swap', 'DOS FAT16', 'Win98 FAT32', 'Linux RAID'); +@important_types = ('Linux native', 'Linux swap', 'Win98 FAT32'); +@important_types2 = ('ReiserFS', 'Linux RAID'); @fields2save = qw(primary extended totalsectors); @@ -189,7 +190,10 @@ my %fs2type = reverse %type2fs; 1; -sub important_types { $_[0] and return sort values %types; @important_types } +sub important_types { + $::expert and return sort values %types; + @important_types, $::beginner ? () : @important_types2; +} sub type2name($) { $types{$_[0]} || $_[0] } sub type2fs($) { $type2fs{$_[0]} } @@ -212,9 +216,10 @@ sub isNfs($) { $_[0]{type} eq 'nfs' } #- small hack sub isNT($) { $_[0]{type} == 0x7 } sub isSupermount($) { $_[0]{type} eq 'supermount' } sub isHFS($) { $type2fs{$_[0]{type}} eq 'hfs' } -sub isMountableRW { isExt2($_[0]) || isFat($_[0]) } sub isApplePartMap { defined $_[0]{isMap} } sub isLoopback { defined $_[0]{loopback_file} } +sub isTrueFS { isExt2($_[0]) || isReiserfs($_[0]) } +sub isMountableRW { isTrueFS($_[0]) || isFat($_[0]) } sub isPrimary($$) { my ($part, $hd) = @_; |