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.pm19
1 files changed, 11 insertions, 8 deletions
diff --git a/perl-install/partition_table/mac.pm b/perl-install/partition_table/mac.pm
index 93b9d0934..78e5469cd 100644
--- a/perl-install/partition_table/mac.pm
+++ b/perl-install/partition_table/mac.pm
@@ -1,8 +1,8 @@
-package partition_table::mac; # $Id$
+package partition_table::mac;
use diagnostics;
#use strict; - fixed other PPC code to comply, but program bails on empty partition table - sbenedict
-use vars qw(@ISA $freepart $bootstrap_part $macos_part);
+use vars qw(@ISA $freepart $bootstrap_part $macos_part $new_bootstrap);
@ISA = qw(partition_table::raw);
@@ -79,6 +79,8 @@ $p_format = join '', @$p_format;
my $magic = 0x4552;
my $pmagic = 0x504D;
+sub use_pt_type { 1 }
+
sub first_usable_sector { 1 }
sub adjustStart($$) {
@@ -96,7 +98,7 @@ sub adjustEnd($$) {
my ($_hd, $_part) = @_;
}
-sub read($$) {
+sub read_one {
my ($hd, $sector) = @_;
my $tmp;
@@ -191,7 +193,7 @@ sub read($$) {
}
sub write($$$;$) {
- my ($hd, $sector, $pt, $info) = @_;
+ my ($hd, $_handle, $sector, $pt, $info) = @_;
#- handle testing for writing partition table on file only!
my $F;
@@ -296,7 +298,7 @@ sub write($$$;$) {
$_->{pFlags} = 0x33;
$_->{isBoot} = 1;
log::l("writing a bootstrap at /dev/$_->{device}");
- $install_steps_interactive::new_bootstrap = 1 if !(defined $bootstrap_part);
+ $new_bootstrap = 1 if !(defined $bootstrap_part);
$bootstrap_part = "/dev/" . $_->{device};
} elsif (isSwap($_)) {
$_->{pType} = "Apple_UNIX_SVR2";
@@ -355,8 +357,8 @@ sub info {
$info;
}
-sub clear_raw {
- my ($hd) = @_;
+sub initialize {
+ my ($class, $hd) = @_;
my @oldraw = @{$hd->{primary}{raw}};
my $pt = { raw => [ ({}) x 63 ], info => info($hd) };
@@ -387,7 +389,8 @@ sub clear_raw {
}
@{$pt->{info}{ddMap}} = @{$hd->{primary}{info}{ddMap}};
- $pt;
+ $hd->{primary} = $pt;
+ bless $hd, $class;
}
1;