use fs::proc_partitions;
package fs::proc_partitions;
log::l("PATCH: not checking /proc/partitions for partition_table::lvm");
my $real_compare = \&compare;
undef *compare;
*compare = sub {
my ($hd) = @_;
eval { $hd->isa('partition_table::lvm') } and return;
&$real_compare;
};
use partition_table;
package partition_table;
log::l("PATCH: looking for partition_table::lvm before partition_table::dos ");
undef *read_primary;
*read_primary = sub {
my ($hd) = @_;
#- it can be safely considered that the first sector is used to probe the partition table
#- but other sectors (typically for extended partition ones) have to match this type!
my @parttype = (
if_(arch() =~ /^ia64/, 'gpt'),
arch() =~ /^sparc/ ? ('sun', 'bsd') : ('lvm', 'dos', 'bsd', 'sun', 'mac'),
);
foreach ('empty', @parttype, 'unknown') {
/unknown/ and die "unknown partition table format on disk " . $hd->{file};