From 6bb20f31aafa5345a949f6439df330e06a8d29bd Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 20 Apr 2019 11:05:54 +0100 Subject: Remove obsolete comment and fix indentation. --- perl-install/partition_table.pm | 50 ++++++++++++++++++++--------------------- 1 file 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; } -- cgit v1.2.1