summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table_mac.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/partition_table_mac.pm')
-rw-r--r--perl-install/partition_table_mac.pm25
1 files changed, 15 insertions, 10 deletions
diff --git a/perl-install/partition_table_mac.pm b/perl-install/partition_table_mac.pm
index 30c269398..800bfc285 100644
--- a/perl-install/partition_table_mac.pm
+++ b/perl-install/partition_table_mac.pm
@@ -138,23 +138,23 @@ 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 $partition_table_mac'freepart_start && $partition_table_mac'freepart_size >= 1) {
+ if (defined $partition_table_mac::freepart_start && $partition_table_mac::freepart_size >= 1) {
#- already found a suitable partition
} else {
- $partition_table_mac'freepart_start = $h{start};
- $partition_table_mac'freepart_size = $h{size}/2048;
- $partition_table_mac'freepart_device = $hd;
- log::l("free apple partition found on drive /dev/$partition_table_mac'freepart_device->{device}, block $partition_table_mac'freepart_start, size $partition_table_mac'freepart_size");
+ $partition_table_mac::freepart_start = $h{start};
+ $partition_table_mac::freepart_size = $h{size}/2048;
+ $partition_table_mac::freepart_device = $hd;
+ log::l("free apple partition found on drive /dev/$partition_table_mac::freepart_device->{device}, block $partition_table_mac::freepart_start, size $partition_table_mac::freepart_size");
}
next;
#$h{type} = 0x0;
} elsif ($h{pType} =~ /^Apple_HFS/i) {
$h{type} = 0x402;
- if (defined $partition_table_mac'macos_part) {
+ if (defined $partition_table_mac::macos_part) {
#- swag at identifying MacOS - 1st HFS partition
} else {
- $partition_table_mac'macos_part = "/dev/" . $hd->{device} . ($i+1);
- log::l("found MacOS at partition $partition_table_mac'macos_part");
+ $partition_table_mac::macos_part = "/dev/" . $hd->{device} . ($i+1);
+ log::l("found MacOS at partition $partition_table_mac::macos_part");
}
} elsif ($h{pType} =~ /^Apple_Partition_Map/i) {
$h{type} = 0x401;
@@ -162,8 +162,13 @@ sub read($$) {
} elsif ($h{pType} =~ /^Apple_Bootstrap/i) {
$h{type} = 0x401;
$h{isBoot} = 1;
- $partition_table_mac'bootstrap_part = "/dev/" . $hd->{device} . ($i+1);
- log::l("found bootstrap at partition $partition_table_mac'bootstrap_part");
+ if (defined $partition_table_mac::bootstrap_part) {
+ #found a bootstrap already - use it, but log the find
+ log::l("found another apple bootstrap at partition /dev/$hd->{device}" . ($i+1));
+ } else {
+ $partition_table_mac::bootstrap_part = "/dev/" . $hd->{device} . ($i+1);
+ log::l("found apple bootstrap at partition $partition_table_mac::bootstrap_part");
+ }
} else {
$h{type} = 0x401;
$h{isDriver} = 1;