From 65ace13dc9c5de248e0d75d6e2076f640793528e Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 18 Sep 2007 12:47:50 +0000 Subject: create partition_table::readonly and use it --- perl-install/partition_table/lvm.pm | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'perl-install/partition_table/lvm.pm') diff --git a/perl-install/partition_table/lvm.pm b/perl-install/partition_table/lvm.pm index 0e8090772..e82d026e1 100644 --- a/perl-install/partition_table/lvm.pm +++ b/perl-install/partition_table/lvm.pm @@ -5,23 +5,19 @@ package partition_table::lvm; # $Id: $ use diagnostics; use strict; -our @ISA = qw(partition_table::raw); +1; use common; -use partition_table::raw; use fs::type; use lvm; -sub initialize { - my ($class, $hd) = @_; +sub _parts { + my ($hd) = @_; my $part = { size => $hd->{totalsectors}, device => $hd->{device} }; add2hash($part, fs::type::type_name2subpart('Linux Logical Volume Manager')); - $hd->{readonly} = $hd->{getting_rid_of_readonly_allowed} = 1; - $hd->{primary}{normal} = [ $part ]; - - bless $hd, $class; + [ $part ]; } sub read_primary { @@ -32,6 +28,8 @@ sub read_primary { $type && $type->{pt_type} == $wanted->{pt_type} or return; - partition_table::lvm->initialize($hd); + require partition_table::readonly; + partition_table::readonly->initialize($hd, _parts($hd)); + 1; } -- cgit v1.2.1