From c73a636af3478eb0c78c3768d381b42bac173569 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 21 Aug 2003 14:33:53 +0000 Subject: - fix call to openit() - replace *F with $F --- perl-install/partition_table.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'perl-install/partition_table.pm') diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index 4df9903eb..9e6118385 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -606,11 +606,10 @@ sub write { if ($hd->{needKernelReread} && ref($hd->{needKernelReread}) eq 'ARRAY' && $::isStandalone) { #- we've only been adding partitions. Try special add_partition (using BLKPG_ADD_PARTITION) - local *F; - partition_table::raw::openit($hd, *F) or goto force_reread; + my $F = partition_table::raw::openit($hd) or goto force_reread; foreach (@{$hd->{needKernelReread}}) { - c::add_partition(fileno F, $_->{start}, $_->{size}, $_->{device} =~ /(\d+)$/) + c::add_partition(fileno $F, $_->{start}, $_->{size}, $_->{device} =~ /(\d+)$/) or goto force_reread; } } elsif ($hd->{needKernelReread}) { @@ -787,13 +786,12 @@ sub next_start { sub load { my ($hd, $file, $b_force) = @_; - local *F; - open F, $file or die \N("Error reading file %s", $file); + open(my $F, $file) or die \N("Error reading file %s", $file); my $h; { local $/ = "\0"; - eval ; + eval <$F>; } $@ and die \N("Restoring from file %s failed: %s", $file, $@); -- cgit v1.2.1