summaryrefslogtreecommitdiffstats
path: root/perl-install/printer.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-10-05 23:20:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-10-05 23:20:59 +0000
commitbf32c8c6a99f6f9e06ee6be7b0ccafb57032f054 (patch)
treef9722eea2a2d5d0569dbf19a3c400f6649fe8ee9 /perl-install/printer.pm
parent6e10a5c1c062bc55d1a3327cd13d4447ee9a3010 (diff)
downloadd
-rw-r--r--perl-install/fsedit.pm24
-rw-r--r--Diffstat (limited to 'perl-install/printer.pm')
0 files changed, 0 insertions, 0 deletions
tr>
3 files changed, 19 insertions, 46 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;
}
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 624e3c111..462fac56f 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -241,7 +241,7 @@ sub read_one($$) {
if_(arch() =~ /^ia64/, 'gpt'),
arch() =~ /^sparc/ ? ('sun', 'bsd') : ('dos', 'bsd', 'sun', 'mac'),
);
- foreach ('empty', @parttype, 'lvm_PV', 'unknown') {
+ foreach ('empty', @parttype, 'unknown') {
/unknown/ and die "unknown partition table format on disk " . $hd->{file};
eval {
# perl_checker: require partition_table::bsd
diff --git a/perl-install/partition_table/lvm_PV.pm b/perl-install/partition_table/lvm_PV.pm
deleted file mode 100644
index b53867d5f..000000000
--- a/perl-install/partition_table/lvm_PV.pm
+++ /dev/null
@@ -1,39 +0,0 @@
-package partition_table::lvm_PV; # $Id$
-
-use diagnostics;
-use strict;
-
-our @ISA = qw(partition_table::raw);
-
-use partition_table::raw;
-use c;
-
-
-#- Allows people having PVs on unpartitioned disks to install
-#- (but no way to create such beasts)
-#-
-#- another way to handle them would be to ignore those disks,
-#- but this would make those hds unshown in diskdrake,
-#- disallowing to zero_MBR, clearing this PV
-
-
-sub read {
- my ($hd, $_sector) = @_;
-
- require fs::type;
- my $t = fs::type::type_subpart_from_magic($hd);
-
- $t && $t->{pt_type} == 0x8e or die "bad magic number on disk $hd->{device}";
-
- [];
-}
-
-sub write {
- die "ERROR: should not be writing raw disk lvm PV!!";
-}
-
-sub clear_raw {
- die "ERROR: should not be creating new raw disk lvm PV!!";
-}
-
-1;