summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-10-19 16:19:19 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-10-19 16:19:19 +0000
commitf4ec72a8fcc07099380ad0ec10ad2df05160bcfb (patch)
tree63dd7a9498e29780ade21157941d53c53485f5d0 /perl-install
parent75298521ee120412992df31ddd9f02338ff199fb (diff)
downloaddrakx-f4ec72a8fcc07099380ad0ec10ad2df05160bcfb.tar
drakx-f4ec72a8fcc07099380ad0ec10ad2df05160bcfb.tar.gz
drakx-f4ec72a8fcc07099380ad0ec10ad2df05160bcfb.tar.bz2
drakx-f4ec72a8fcc07099380ad0ec10ad2df05160bcfb.tar.xz
drakx-f4ec72a8fcc07099380ad0ec10ad2df05160bcfb.zip
handle empty $hd->{primary}{raw} (happens with no partitions on ia64)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/partition_table.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 350431870..ee1769ad9 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -525,8 +525,12 @@ sub write {
$hd->{isDirty} or return;
#- set first primary partition active if no primary partitions are marked as active.
- for ($hd->{primary}{raw}) {
- (grep { $_->{local_start} = $_->{start}; $_->{active} ||= 0 } @$_) or $_->[0]{active} = 0x80;
+ if (my @l = @{$hd->{primary}{raw}}) {
+ foreach (@l) {
+ $_->{local_start} = $_->{start};
+ $_->{active} ||= 0;
+ }
+ $l[0]{active} = 0x80 if !grep { $_->{active} } @l;
}
#- last chance for verification, this make sure if an error is detected,