summaryrefslogtreecommitdiffstats
path: root/perl-install/fsedit.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-11-16 16:47:04 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-11-16 16:47:04 +0000
commit57cb518585e76d8ae16f0acd62b6ed13f17c5fed (patch)
tree297dfd2aada1fd0426b8a4ff034dab83b0c2a96a /perl-install/fsedit.pm
parentc61d24242661df10056834c624fdf355f790a2dc (diff)
downloaddrakx-57cb518585e76d8ae16f0acd62b6ed13f17c5fed.tar
drakx-57cb518585e76d8ae16f0acd62b6ed13f17c5fed.tar.gz
drakx-57cb518585e76d8ae16f0acd62b6ed13f17c5fed.tar.bz2
drakx-57cb518585e76d8ae16f0acd62b6ed13f17c5fed.tar.xz
drakx-57cb518585e76d8ae16f0acd62b6ed13f17c5fed.zip
handle more nicely raw_lvm_PV (don't simply ignore them)
Diffstat (limited to 'perl-install/fsedit.pm')
-rw-r--r--perl-install/fsedit.pm24
1 files changed, 18 insertions, 6 deletions
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;
}