summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/partition_table.pm50
1 files changed, 24 insertions, 26 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index f294dc809..da8a15b6e 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -305,32 +305,30 @@ sub read_primary {
$current = 'dos' if $current eq 'msdos';
$hd->{current_pt_table_type} = $current;
- #- 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 = (
- # gpt must be tried before dos as it presents a fake compatibility mbr
- 'gpt', 'lvm', 'dmcrypt', 'dos', 'bsd', 'sun', 'mac',
- );
- foreach ('empty', @parttype, 'unknown') {
- /unknown/ and die "unknown partition table format on disk " . $hd->{file};
-
- # perl_checker: require partition_table::bsd
- # perl_checker: require partition_table::dos
- # perl_checker: require partition_table::empty
- # perl_checker: require partition_table::dmcrypt
- # perl_checker: require partition_table::lvm
- # perl_checker: require partition_table::gpt
- # perl_checker: require partition_table::mac
- # perl_checker: require partition_table::sun
- require "partition_table/$_.pm";
- bless $hd, "partition_table::$_";
- if ($hd->read_primary) {
- log::l("found a $_ partition table on $hd->{file} at sector 0");
- #- Don't rely on the type returned by libparted - use what we have discovered.
- $hd->{pt_table_type} = $_ if $_ ne 'empty';
- return 1;
- }
- }
+ my @parttype = (
+ # gpt must be tried before dos as it presents a fake compatibility mbr
+ 'gpt', 'lvm', 'dmcrypt', 'dos', 'bsd', 'sun', 'mac',
+ );
+ foreach ('empty', @parttype, 'unknown') {
+ /unknown/ and die "unknown partition table format on disk " . $hd->{file};
+
+ # perl_checker: require partition_table::bsd
+ # perl_checker: require partition_table::dos
+ # perl_checker: require partition_table::empty
+ # perl_checker: require partition_table::dmcrypt
+ # perl_checker: require partition_table::lvm
+ # perl_checker: require partition_table::gpt
+ # perl_checker: require partition_table::mac
+ # perl_checker: require partition_table::sun
+ require "partition_table/$_.pm";
+ bless $hd, "partition_table::$_";
+ if ($hd->read_primary) {
+ log::l("found a $_ partition table on $hd->{file} at sector 0");
+ #- Don't rely on the type returned by libparted - use what we have discovered.
+ $hd->{pt_table_type} = $_ if $_ ne 'empty';
+ return 1;
+ }
+ }
0;
}