diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2002-07-23 11:08:35 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2002-07-23 11:08:35 +0000 |
commit | 61b0cd36577df2a9f86cb2c08d14737f0bbcb557 (patch) | |
tree | 08dfd2ab02af6b7c7410158a531a95c2db7b3350 /perl-install/partition_table/lvm_PV.pm | |
parent | 6ed6b5341362f87e3c70420f206a33f71c72a3de (diff) | |
download | drakx-61b0cd36577df2a9f86cb2c08d14737f0bbcb557.tar drakx-61b0cd36577df2a9f86cb2c08d14737f0bbcb557.tar.gz drakx-61b0cd36577df2a9f86cb2c08d14737f0bbcb557.tar.bz2 drakx-61b0cd36577df2a9f86cb2c08d14737f0bbcb557.tar.xz drakx-61b0cd36577df2a9f86cb2c08d14737f0bbcb557.zip |
g Move 2: partition table: hierarchy
Diffstat (limited to 'perl-install/partition_table/lvm_PV.pm')
-rw-r--r-- | perl-install/partition_table/lvm_PV.pm | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/perl-install/partition_table/lvm_PV.pm b/perl-install/partition_table/lvm_PV.pm new file mode 100644 index 000000000..4a55d3810 --- /dev/null +++ b/perl-install/partition_table/lvm_PV.pm @@ -0,0 +1,43 @@ +package partition_table::lvm; # $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) = @_; + + local *F; partition_table::raw::openit($hd, *F) 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; |