From e6cc29951c4bad7f62621ce07c8b394e7e709cb8 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 24 Jun 2003 10:39:55 +0000 Subject: (grub2dev) - remove dead code - enhance comment --- perl-install/bootloader.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 6f10bf77c..a029f099a 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -1029,9 +1029,8 @@ sub grub2dev { my ($device, $o_block_device) = @_; my ($dev, $part) = ($1 . ")", $2) if $device =~ s/(\([^,]*?)(?:,(.*))?\)//; undef $part if $o_block_device; - $part++ if defined $part; # grub wants "(hdX,Y)" where lilo just want "hdX" + $part++ if defined $part; # grub wants "(hdX,Y)" where lilo just want "hdY+1" $dev =~ s/,[^)]*//; - my %h = map { chomp; s/()//g; split(/\s+/, $_, 2) } cat_("$::prefix/boot/grub/device.map"); my $new_dev = +{ map { chomp; s/()//g; split(/\s+/, $_, 2) } cat_("$::prefix/boot/grub/device.map") }->{$dev} . $part; wantarray() ? ($device, $new_dev) : $new_dev; } -- cgit v1.2.1