aboutsummaryrefslogtreecommitdiffstats
path: root/perl.prov
Commit message (Expand)AuthorAgeFilesLines
* Some packages, like DB, might be temporarily redefined into a perl module.Rafael Garcia-Suarez2006-09-081-3/+6
* Don't search perl files for provides if they don't end with .pm (becauseRafael Garcia-Suarez2006-03-161-0/+2
* - remove Makefile.in from cvs0.1Olivier Thauvin2005-04-291-0/+180
739fca2257cbd6d37036b266a4f8a'>treecommitdiffstats
path: root/perl-install/partition_table/lvm_PV.pm
blob: 6311a7da55780fc7d5c749922b3bef99629d4400 (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
40
41
42
43
package partition_table::lvm_PV; # $Id$

use diagnostics;
use strict;

our @ISA = qw(partition_table::raw);

use partition_table::raw;
use c;

my $magic = "HM\1\0";
my $offset = 0;


#- 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) = @_;

    my $F = partition_table::raw::openit($hd) or die "failed to open device";
    c::lseek_sector(fileno($F), $sector, $offset) or die "reading of partition in sector $sector failed";

    sysread $F, my $tmp, length $magic or die "error reading magic number on disk $hd->{file}";
    $tmp eq $magic or die "bad magic number on disk $hd->{file}";

    [];
}

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;