From 509059250b46a223051f0d7daa64461596d197d8 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 25 Jul 2002 15:50:57 +0000 Subject: Help "perl -cw" not reporting any warning - for mac free partition, use $freepart instead of $freepart_device, $freepart_size ... - replace $timezone::ntp_servers by a function --- perl-install/partition_table/mac.pm | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'perl-install/partition_table/mac.pm') diff --git a/perl-install/partition_table/mac.pm b/perl-install/partition_table/mac.pm index 89fb9ceaf..45c614139 100644 --- a/perl-install/partition_table/mac.pm +++ b/perl-install/partition_table/mac.pm @@ -2,7 +2,7 @@ package partition_table::mac; # $Id$ use diagnostics; #use strict; - fixed other PPC code to comply, but program bails on empty partition table - sbenedict -use vars qw(@ISA $freepart_device $bootstrap_part $freepart_start $freepart_size $freepart_part $macos_part); +use vars qw(@ISA $freepart $bootstrap_part $macos_part); @ISA = qw(partition_table::raw); @@ -144,14 +144,11 @@ sub read($$) { $h{pName} =~ /swap/i ? ($h{type} = 0x82) : ($h{type} = 0x83); } elsif ($h{pType} =~ /^Apple_Free/i) { #- need to locate a 1MB partition to setup a bootstrap on - if (defined $freepart_start && $freepart_size >= 1) { - #- already found a suitable partition + if ($freepart && $freepart->{size} >= 1) { + #- already found a suitable partition } else { - $freepart_start = $h{start}; - $freepart_size = $h{size}/2048; - $freepart_device = $hd; - $freepart_part = "/dev/" . $hd->{device} . ($i+1); - log::l("free apple partition found on drive /dev/$freepart_device->{device}, block $freepart_start, size $freepart_size"); + $freepart = { start => $h{start}, size => $h{size}/2048, hd => $hd, part => "/dev/$hd->{device}" . ($i+1) }; + log::l("free apple partition found on drive /dev/$freepart->{hd}{device}, block $freepart->{start}, size $freepart->{size}"); } $h{type} = 0x0; $h{pName} = 'Extra'; -- cgit v1.2.1