summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table/gpt.pm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2015-03-24 10:47:13 -0400
committerThierry Vignaud <thierry.vignaud@gmail.com>2015-03-25 19:55:50 +0100
commitee22664bcb1fdedece15e07d047ba86f3d791ee6 (patch)
treecffb13ac5187db2920dc75c07d9e353e092e4421 /perl-install/partition_table/gpt.pm
parentb2df46a676b8511523ab6859f5393680316e1b1f (diff)
downloaddrakx-ee22664bcb1fdedece15e07d047ba86f3d791ee6.tar
drakx-ee22664bcb1fdedece15e07d047ba86f3d791ee6.tar.gz
drakx-ee22664bcb1fdedece15e07d047ba86f3d791ee6.tar.bz2
drakx-ee22664bcb1fdedece15e07d047ba86f3d791ee6.tar.xz
drakx-ee22664bcb1fdedece15e07d047ba86f3d791ee6.zip
fix retrieving ESP partition type
ESP are the only partitions we're detecting through their pt_type (modulo 0x12 which was Compaq Diagnostic & unlikely to be found on GPT...) However GPT has no equivalent to pt_type But we can test for ESP flag
Diffstat (limited to 'perl-install/partition_table/gpt.pm')
-rw-r--r--perl-install/partition_table/gpt.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm
index 77173b268..fdcad1e85 100644
--- a/perl-install/partition_table/gpt.pm
+++ b/perl-install/partition_table/gpt.pm
@@ -107,8 +107,12 @@ sub read_one {
c::get_disk_type($hd->{file}) eq "gpt" or die "$hd->{device} not a GPT disk ($hd->{file})";
my @pt;
- # FIXME: just use '@pt = c::...' if part_numbers are always linear:
+ # FIXME: just use '@pt = map { ... } c::...' if part_numbers are always linear:
foreach (c::get_disk_partitions($hd->{file})) {
+ # fix detecting ESP (special case are they're detected through pt_type):
+ if (c::is_partition_ESP($hd->{file}, $_->{part_number}) {
+ $_->{pt_type} = 0xef;
+ }
@pt[$_->{part_number}-1] = $_;
}