summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-07-12 02:28:16 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-07-12 02:28:16 +0000
commit08beb3710539ff52ec2fdc31d32e48a056298366 (patch)
tree733972b6284faa10a03b1273ce7f0eb1bfaa3710 /perl-install/bootloader.pm
parent2a71cdc4945dc8b9074c2a571d8c3a45859c97f6 (diff)
downloaddrakx-backup-do-not-use-08beb3710539ff52ec2fdc31d32e48a056298366.tar
drakx-backup-do-not-use-08beb3710539ff52ec2fdc31d32e48a056298366.tar.gz
drakx-backup-do-not-use-08beb3710539ff52ec2fdc31d32e48a056298366.tar.bz2
drakx-backup-do-not-use-08beb3710539ff52ec2fdc31d32e48a056298366.tar.xz
drakx-backup-do-not-use-08beb3710539ff52ec2fdc31d32e48a056298366.zip
(sort_hds_according_to_bios): when installing on floppy, $boot_hd is undefined, but that's ok (bugzilla #10260)
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 7c8f5eb8d..df12c227a 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -1048,13 +1048,13 @@ sub mixed_kind_of_disks {
sub sort_hds_according_to_bios {
my ($bootloader, $hds) = @_;
- my $boot_hd = fs::device2part($bootloader->{first_hd_device} || $bootloader->{boot}, $hds) or die "sort_hds_according_to_bios: unknown hd"; #- if not on mbr
- my $boot_kind = hd2bios_kind($boot_hd);
+ my $boot_hd = fs::device2part($bootloader->{first_hd_device} || $bootloader->{boot}, $hds); #- $boot_hd is undefined when installing on floppy
+ my $boot_kind = $boot_hd && hd2bios_kind($boot_hd);
my $translate = sub {
my ($hd) = @_;
my $kind = hd2bios_kind($hd);
- ($hd == $boot_hd ? 0 : $kind eq $boot_kind ? 1 : 2) . "_$kind";
+ $boot_hd ? ($hd == $boot_hd ? 0 : $kind eq $boot_kind ? 1 : 2) . "_$kind" : $kind;
};
sort { $translate->($a) cmp $translate->($b) } @$hds;
}