summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
authorStew Benedict <stewb@mandriva.org>2001-07-27 14:27:03 +0000
committerStew Benedict <stewb@mandriva.org>2001-07-27 14:27:03 +0000
commitea4e11187b9a5acdb4a0e29280393ba7d97e3bad (patch)
tree31379683db0af3ffae65b63b8fcdecc7ffa50097 /perl-install/partition_table.pm
parent2e594437945bbec328351bffd6775a1af5e16430 (diff)
downloaddrakx-backup-do-not-use-ea4e11187b9a5acdb4a0e29280393ba7d97e3bad.tar
drakx-backup-do-not-use-ea4e11187b9a5acdb4a0e29280393ba7d97e3bad.tar.gz
drakx-backup-do-not-use-ea4e11187b9a5acdb4a0e29280393ba7d97e3bad.tar.bz2
drakx-backup-do-not-use-ea4e11187b9a5acdb4a0e29280393ba7d97e3bad.tar.xz
drakx-backup-do-not-use-ea4e11187b9a5acdb4a0e29280393ba7d97e3bad.zip
last of sync with PPC beta mods
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r--perl-install/partition_table.pm22
1 files changed, 20 insertions, 2 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 514d5568a..684136207 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -297,8 +297,26 @@ sub assign_device_numbers($) {
my ($hd) = @_;
my $i = 1;
- $_->{device} = $hd->{prefix} . $i++ foreach @{$hd->{primary}{raw}},
+ my $start = 1;
+
+ #- on PPC we need to assign device numbers to the holes too - big FUN!
+ if (arch() =~ /ppc/) {
+ #- first sort the normal parts
+ $hd->{primary}{normal} = [sort { $a->{start} <=> $b->{start} } @{$hd->{primary}{normal}} ];
+
+ #- now loop through them, assigning partition numbers - reserve one for the holes
+ foreach (@{$hd->{primary}{normal}}) {
+ if ($_->{start} > $start) {
+ log::l("PPC: found a hole on $hd->{prefix} before $_->{start}, skipping device...");
+ $i++;
+ }
+ $_->{device} = $hd->{prefix} . $i++;
+ $start = $_->{start} + $_->{size};
+ }
+ } else {
+ $_->{device} = $hd->{prefix} . $i++ foreach @{$hd->{primary}{raw}},
map { $_->{normal} } @{$hd->{extended} || []};
+ }
#- try to figure what the windobe drive letter could be!
#
@@ -560,7 +578,7 @@ sub add_primary($$) {
}
sub add_extended {
- arch() =~ /^sparc/ and die _("Extended partition not supported on this platform");
+ arch() =~ /^sparc|ppc/ and die _("Extended partition not supported on this platform");
my ($hd, $part, $extended_type) = @_;
$extended_type =~ s/Extended_?//;