diff options
Diffstat (limited to 'perl-install/partition_table/sun.pm')
-rw-r--r-- | perl-install/partition_table/sun.pm | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/perl-install/partition_table/sun.pm b/perl-install/partition_table/sun.pm index 54e734ca8..e665d0168 100644 --- a/perl-install/partition_table/sun.pm +++ b/perl-install/partition_table/sun.pm @@ -1,4 +1,4 @@ -package partition_table::sun; # $Id$ +package partition_table::sun; use diagnostics; use strict; @@ -39,6 +39,8 @@ my $magic = 0xDABE; my $nb_primary = 8; my $offset = 0; +sub use_pt_type { 1 } + sub adjustStart($$) { my ($hd, $part) = @_; my $end = $part->{start} + $part->{size}; @@ -71,7 +73,7 @@ sub compute_crc($) { $crc; } -sub read($$) { +sub read_one { my ($hd, $sector) = @_; my $tmp; @@ -117,7 +119,7 @@ sub read($$) { # write the partition table (and extended ones) # for each entry, it uses fields: start, size, pt_type, active sub write($$$;$) { - my ($hd, $sector, $pt, $info) = @_; + my ($hd, $_handle, $sector, $pt, $info) = @_; # my ($csize, $wdsize) = (0, 0); #- handle testing for writing partition table on file only! @@ -184,7 +186,7 @@ sub info { $info; } -sub clear_raw { +sub initialize { my ($hd) = @_; my $pt = { raw => [ ({}) x $nb_primary ], info => info($hd) }; @@ -196,7 +198,8 @@ sub clear_raw { size => $hd->{geom}{cylinders} * $hd->cylinder_size, }; - $pt; + $hd->{primary} = $pt; + bless $hd, 'partition::sun'; } 1; |