From ce9f2f3dc52173a581d8a6c2ab41e2911d4a47e6 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 18 Sep 2007 10:23:17 +0000 Subject: transform ->clear_raw into the more generic ->initialize (useful to have a more standard partition_table::lvm) --- perl-install/partition_table/gpt.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'perl-install/partition_table/gpt.pm') diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm index de83dadf8..ba9307df3 100644 --- a/perl-install/partition_table/gpt.pm +++ b/perl-install/partition_table/gpt.pm @@ -184,7 +184,7 @@ sub write { { # write the PMBR - my $pmbr = partition_table::dos::clear_raw(); + my $pmbr = partition_table::dos::empty_raw(); $pmbr->{raw}[0] = { pt_type => 0xee, local_start => $info->{myLBA}, size => $info->{alternateLBA} - $info->{myLBA} + 1 }; partition_table::dos::write($hd, $sector, $pmbr->{raw}); } @@ -258,9 +258,10 @@ sub info { }; } -sub clear_raw { - my ($hd) = @_; - { raw => [], info => info($hd) }; +sub initialize { + my ($class, $hd) = @_; + $hd->{primary} = { raw => [], info => info($hd) }; + bless $hd, $class; } 1; -- cgit v1.2.1