From 57cb518585e76d8ae16f0acd62b6ed13f17c5fed Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 16 Nov 2004 16:47:04 +0000 Subject: handle more nicely raw_lvm_PV (don't simply ignore them) --- perl-install/fsedit.pm | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'perl-install/fsedit.pm') diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm index 42404bfe8..a57fd64e4 100644 --- a/perl-install/fsedit.pm +++ b/perl-install/fsedit.pm @@ -135,12 +135,24 @@ sub get_hds { log::l("using /proc/partitions since diskdrake failed :("); use_proc_partitions($hd); 1; - } elsif (exists $hd->{usb_description} && fs::type::fs_type_from_magic($hd)) { - #- non partitioned drive - $hd->{fs_type} = fs::type::fs_type_from_magic($hd); - push @raw_hds, $hd; - $hd = ''; - 1; + } elsif (my $type = fs::type::type_subpart_from_magic($hd)) { + #- non partitioned drive? + if (exists $hd->{usb_description} && $type->{fs_type}) { + #- USB keys + put_in_hash($hd, $type); + push @raw_hds, $hd; + $hd = ''; + 1; + } elsif ($type->{pt_type} == 0x8e) { + #- LVM on full disk + my $part = { size => $hd->{totalsectors}, device => $hd->{device}, %$type }; + bless $hd, 'partition_table::raw'; + $hd->{readonly} = $hd->{getting_rid_of_readonly_allowed} = 1; + $hd->{primary}{normal} = [ $part ]; + 1; + } else { + 0; + } } else { 0; } -- cgit v1.2.1