diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-05-24 12:11:27 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-05-24 13:35:49 +0200 |
commit | fd0c659539609be48af980e6201c262bfcd9aa57 (patch) | |
tree | 041682c10ffdd7693f9b151c5495e2e3534add50 /perl-install/partition_table/gpt.pm | |
parent | 2f4fdd431e3237aff5d489c26c91fd1666e00023 (diff) | |
download | drakx-fd0c659539609be48af980e6201c262bfcd9aa57.tar drakx-fd0c659539609be48af980e6201c262bfcd9aa57.tar.gz drakx-fd0c659539609be48af980e6201c262bfcd9aa57.tar.bz2 drakx-fd0c659539609be48af980e6201c262bfcd9aa57.tar.xz drakx-fd0c659539609be48af980e6201c262bfcd9aa57.zip |
set pt_type according to fs_type before flag cases (mga#16029)
Diffstat (limited to 'perl-install/partition_table/gpt.pm')
-rw-r--r-- | perl-install/partition_table/gpt.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm index 332889e1f..d07b634d0 100644 --- a/perl-install/partition_table/gpt.pm +++ b/perl-install/partition_table/gpt.pm @@ -120,6 +120,11 @@ sub read_one { my @pt; # FIXME: just use '@pt = map { ... } c::...' if part_numbers are always linear: foreach (c::get_disk_partitions($hd->{file})) { + # compatibility with MBR partitions tables: + $_->{pt_type} = 0x82 if $_->{fs_type} eq 'swap'; + $_->{pt_type} = 0x0b if $_->{fs_type} eq 'vfat'; + $_->{pt_type} = 0x83 if $_->{fs_type} =~ /^ext/; + # fix detecting ESP (special case are they're detected through pt_type): if ($_->{flag} eq 'ESP') { $_->{pt_type} = 0xef; @@ -132,11 +137,6 @@ sub read_one { } $_->{fs_type} = $parted_mapping{$_->{fs_type}} if $parted_mapping{$_->{fs_type}}; - # compatibility with MBR partitions tables: - $_->{pt_type} = 0x82 if $_->{fs_type} eq 'swap'; - $_->{pt_type} = 0x0b if $_->{fs_type} eq 'vfat'; - $_->{pt_type} = 0x83 if $_->{fs_type} =~ /^ext/; - @pt[$_->{part_number}-1] = $_; } |