summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table/lvm_PV.pm
blob: b53867d5fc612494ee2cb4293337b598d1c90050 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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;