summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
authorStew Benedict <stewb@mandriva.org>2001-03-03 00:16:02 +0000
committerStew Benedict <stewb@mandriva.org>2001-03-03 00:16:02 +0000
commit348d706236d2bf7e09bc8214b657faef0b0a30c5 (patch)
treee043ef50e51de81b1fc2c670dae47865f272f812 /perl-install/partition_table.pm
parentca30149eca5c7153676f70f8546736646a4343b9 (diff)
downloaddrakx-backup-do-not-use-348d706236d2bf7e09bc8214b657faef0b0a30c5.tar
drakx-backup-do-not-use-348d706236d2bf7e09bc8214b657faef0b0a30c5.tar.gz
drakx-backup-do-not-use-348d706236d2bf7e09bc8214b657faef0b0a30c5.tar.bz2
drakx-backup-do-not-use-348d706236d2bf7e09bc8214b657faef0b0a30c5.tar.xz
drakx-backup-do-not-use-348d706236d2bf7e09bc8214b657faef0b0a30c5.zip
*** empty log message ***
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r--perl-install/partition_table.pm15
1 files changed, 11 insertions, 4 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index cda10c6db..aa57f0e30 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -6,7 +6,7 @@ package partition_table; # $Id$
@ISA = qw(Exporter);
%EXPORT_TAGS = (
- types => [ qw(type2name type2fs name2type fs2type isExtended isExt2 isReiserfs isTrueFS isSwap isDos isWin isFat isSunOS isOtherAvailableFS isPrimary isNfs isSupermount isRAID isMDRAID isHFS isNT isMountableRW isNonMountable isApplePartMap isLoopback) ],
+ types => [ qw(type2name type2fs name2type fs2type isExtended isExt2 isReiserfs isTrueFS isSwap isDos isWin isFat isSunOS isOtherAvailableFS isPrimary isNfs isSupermount isRAID isMDRAID isHFS isNT isMountableRW isNonMountable isApplePartMap isLoopback isApple isBootstrap) ],
);
@EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
@@ -15,8 +15,11 @@ use common qw(:common :system :functional);
use partition_table_raw;
use log;
-
-@important_types = ('Linux native', 'Linux swap', if_(arch() =~ /i.86/, 'ReiserFS', 'DOS FAT16', 'Win98 FAT32'));
+if (arch() =~ /ppc/) {
+ @important_types = ('Linux native', 'Linux swap', 'Apple HFS Partition', 'Apple Bootstrap');
+} else {
+ @important_types = ('Linux native', 'Linux swap', if_(arch() =~ /i.86/, 'ReiserFS', 'DOS FAT16', 'Win98 FAT32'));
+}
@important_types2 = ('Linux RAID', 'Linux Logical Volume Manager partition');
@fields2save = qw(primary extended totalsectors isDirty needKernelReread);
@@ -27,6 +30,7 @@ my %types = (
0x0 => 'Empty',
arch() =~ /^ppc/ ? (
0x401 => 'Apple Partition',
+ 0x401 => 'Apple Bootstrap',
0x402 => 'Apple HFS Partition',
) : arch() =~ /^i.86/ ? (
0x183 => 'ReiserFS',
@@ -183,6 +187,7 @@ arch() !~ /sparc/ ? (
0x82 => 'swap',
0x83 => 'ext2',
0x183=> 'reiserfs',
+ 0x401 => 'apple',
0x402 => 'hfs',
nfs => 'nfs', #- hack
);
@@ -224,6 +229,8 @@ sub isNfs($) { $_[0]{type} eq 'nfs' } #- small hack
sub isNT($) { arch() !~ /^sparc/ && $_[0]{type} == 0x7 }
sub isSupermount($) { $_[0]{type} eq 'supermount' }
sub isHFS($) { $type2fs{$_[0]{type}} eq 'hfs' }
+sub isApple($) { $type2fs{$_[0]{type}} eq 'apple' && defined $_[0]{isDriver} }
+sub isBootstrap($) { $type2fs{$_[0]{type}} eq 'apple' && defined $_[0]{isBoot} }
sub isHiddenMacPart { defined $_[0]{isMap} }
sub isLoopback { defined $_[0]{loopback_file} }
sub isTrueFS { isExt2($_[0]) || isReiserfs($_[0]) }
@@ -611,7 +618,7 @@ sub add($$;$$) {
my $e = $hd->{primary}{extended};
- if (arch() =~ /^sparc/ ||
+ if (arch() =~ /^sparc|ppc/ ||
$primaryOrExtended eq 'Primary' ||
$primaryOrExtended !~ /Extended/ && is_empty_array_ref($hd->{primary}{normal})) {
eval { add_primary($hd, $part) };