summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2003-04-24 07:15:38 +0000
committerMystery Man <unknown@mandriva.org>2003-04-24 07:15:38 +0000
commit87ef78ed082f9dec4e83a6120b32617b7f7a86b9 (patch)
treeb96ceedd4f1c29745a0651880e71daab8cdb686c /perl-install/partition_table.pm
parent327bd24f8e4291bd1882de1990dd7339f781a9cb (diff)
downloaddrakx-backup-do-not-use-87ef78ed082f9dec4e83a6120b32617b7f7a86b9.tar
drakx-backup-do-not-use-87ef78ed082f9dec4e83a6120b32617b7f7a86b9.tar.gz
drakx-backup-do-not-use-87ef78ed082f9dec4e83a6120b32617b7f7a86b9.tar.bz2
drakx-backup-do-not-use-87ef78ed082f9dec4e83a6120b32617b7f7a86b9.tar.xz
drakx-backup-do-not-use-87ef78ed082f9dec4e83a6120b32617b7f7a86b9.zip
This commit was manufactured by cvs2svn to create tag 'V1_1_9_56mdk'.V1_1_9_56mdk
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r--perl-install/partition_table.pm11
1 files changed, 9 insertions, 2 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index c7342f0e7..ab7a7ee59 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -6,7 +6,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @important_types @important_types2 @fie
@ISA = qw(Exporter);
%EXPORT_TAGS = (
- types => [ qw(type2name type2fs name2type fs2type isExtended isExt2 isThisFs isTrueFS isSwap isDos isWin isFat isSunOS isOtherAvailableFS isPrimary isRawLVM isRawRAID isRAID isLVM isNT isMountableRW isNonMountable isPartOfLVM isPartOfRAID isPartOfLoopback isApplePartMap isLoopback isMounted isBusy isSpecial maybeFormatted isApple isAppleBootstrap) ],
+ types => [ qw(type2name type2fs name2type fs2type isExtended isExt2 isThisFs isTrueFS isSwap isDos isWin isFat isSunOS isOtherAvailableFS isPrimary isRawLVM isRawRAID isRAID isLVM isNT isMountableRW isNonMountable isPartOfLVM isPartOfRAID isPartOfLoopback isApplePartMap isLoopback isMounted isBusy isSpecial maybeFormatted isApple isAppleBootstrap isEfi) ],
);
@EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
@@ -19,6 +19,7 @@ use log;
@important_types = ('Linux native', 'Linux swap',
if_(arch() =~ /i.86/, 'Journalised FS: ext3', 'Journalised FS: ReiserFS', 'Journalised FS: JFS', 'Journalised FS: XFS', 'DOS FAT16', 'FAT32'),
if_(arch() =~ /ia64/, 'Journalised FS: ext3', 'Journalised FS: ReiserFS', 'Journalised FS: XFS', 'FAT32'),
+ if_(arch() =~ /x86_64/, 'Journalised FS: ext3', 'Journalised FS: ReiserFS', 'Journalised FS: XFS', 'FAT32'),
if_(arch() =~ /ppc/, 'Journalised FS: ext3', 'Journalised FS: ReiserFS', 'Journalised FS: JFS', 'Journalised FS: XFS', 'Apple HFS Partition', 'Apple Bootstrap'));
@important_types2 = ('Linux RAID', 'Linux Logical Volume Manager partition');
@@ -46,6 +47,10 @@ if_(arch() =~ /^ppc/,
0x183 => 'Journalised FS: ReiserFS',
0x283 => 'Journalised FS: XFS',
0x483 => 'Journalised FS: ext3',
+), if_(arch() =~ /^x86_64/,
+ 0x183 => 'Journalised FS: ReiserFS',
+ 0x283 => 'Journalised FS: XFS',
+ 0x483 => 'Journalised FS: ext3',
), if_(arch() =~ /^sparc/,
0x1 => 'SunOS boot',
0x2 => 'SunOS root',
@@ -199,6 +204,7 @@ arch() !~ /sparc/ ? (
0x1e => 'vfat',
0x82 => 'swap',
0x83 => 'ext2',
+ 0xef => 'vfat',
0x183=> 'reiserfs',
0x283=> 'xfs',
0x383=> 'jfs',
@@ -226,6 +232,7 @@ sub name2type {
/0x(.*)/ ? hex $1 : $types_rev{$_} || $_;
}
+sub isEfi { arch() =~ /ia64/ && $_[0]{type} == 0xef }
sub isWholedisk { arch() =~ /^sparc/ && $_[0]{type} == 5 }
sub isExtended { arch() !~ /^sparc/ && ($_[0]{type} == 5 || $_[0]{type} == 0xf || $_[0]{type} == 0x85) }
sub isRawLVM { $_[0]{type} == 0x8e }
@@ -244,7 +251,7 @@ sub isHiddenMacPart { defined $_[0]{isMap} }
sub isThisFs { type2fs($_[1]) eq $_[0] }
sub isTrueFS { member(type2fs($_[0]), qw(ext2 reiserfs xfs jfs ext3)) }
-sub isOtherAvailableFS { isFat($_[0]) || isSunOS($_[0]) || isThisFs('hfs', $_[0]) || isThisFs('ntfs', $_[0]) } #- other OS that linux can access its filesystem
+sub isOtherAvailableFS { isEfi($_[0]) || isFat($_[0]) || isSunOS($_[0]) || isThisFs('hfs', $_[0]) || isThisFs('ntfs', $_[0]) } #- other OS that linux can access its filesystem
sub isMountableRW { (isTrueFS($_[0]) || isOtherAvailableFS($_[0])) && !isThisFs('ntfs', $_[0]) }
sub isNonMountable { isRawRAID($_[0]) || isRawLVM($_[0]) }