Mageia Bugzilla – Attachment 6589 Details for
Bug 15987
Installer proposes mount point without drive letter (/media/win_) for FAT32 partition
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
simplify (cherry-picked from mga6 branch)
0003-simplify.patch (text/plain), 1.88 KB, created by
Thierry Vignaud
on 2015-05-20 09:18:36 CEST
(
hide
)
Description:
simplify (cherry-picked from mga6 branch)
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2015-05-20 09:18:36 CEST
Size:
1.88 KB
patch
obsolete
>From 97b55d4ca158dd499ee97c67e3e0d2accb8c6034 Mon Sep 17 00:00:00 2001 >From: Thierry Vignaud <thierry.vignaud@gmail.com> >Date: Sat, 28 Mar 2015 02:46:14 +0100 >Subject: [PATCH 3/4] simplify > >needed for next commit >--- > perl-install/partition_table/gpt.pm | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > >diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm >index 0f0f45c..e8b5219 100644 >--- a/perl-install/partition_table/gpt.pm >+++ b/perl-install/partition_table/gpt.pm >@@ -102,6 +102,12 @@ my %_GUID_to_Label = ( > "89C57F98-2FE5-4DC0-89C1-5EC00CEFF2BE" => "Ceph dm-crypt disk in creation", > ); > >+my %parted_mapping = ( >+ 'linux-swap(v1)' => 'swap', >+ 'ntfs' => 'ntfs-3g', >+ ); >+my %rev_parted_mapping = reverse %parted_mapping; >+ > sub read_one { > my ($hd, $_sector) = @_; > >@@ -120,8 +126,7 @@ sub read_one { > } elsif ($_->{flag} eq 'RECOVERY') { > $_->{pt_type} = 0x12; > } >- $_->{fs_type} = 'swap' if $_->{fs_type} eq 'linux-swap(v1)'; >- $_->{fs_type} = 'ntfs-3g' if $_->{fs_type} eq 'ntfs'; >+ $_->{fs_type} = $parted_mapping{$_->{fs_type}} if $parted_mapping{$_->{fs_type}}; > @pt[$_->{part_number}-1] = $_; > } > >@@ -149,8 +154,7 @@ sub write { > my ($part) = grep { $_->{start} == $o_start && $_->{size} == $o_size } @$pt; > print "($action, $part_number, $o_start, $o_size)\n"; > if ($action eq 'add') { >- local $part->{fs_type} = 'linux-swap(v1)' if isSwap($part->{fs_type}); >- local $part->{fs_type} = 'ntfs' if $part->{fs_type} eq 'ntfs-3g'; >+ local $part->{fs_type} = $rev_parted_mapping{$part->{fs_type}} if $rev_parted_mapping{$part->{fs_type}}; > c::disk_add_partition($hd->{file}, $o_start, $o_size, $part->{fs_type}) or die "failed to add partition #$part_number on $hd->{file}"; > my $flag; > if (isESP($part)) { >-- >2.3.2 >
From 97b55d4ca158dd499ee97c67e3e0d2accb8c6034 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud <thierry.vignaud@gmail.com> Date: Sat, 28 Mar 2015 02:46:14 +0100 Subject: [PATCH 3/4] simplify needed for next commit --- perl-install/partition_table/gpt.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm index 0f0f45c..e8b5219 100644 --- a/perl-install/partition_table/gpt.pm +++ b/perl-install/partition_table/gpt.pm @@ -102,6 +102,12 @@ my %_GUID_to_Label = ( "89C57F98-2FE5-4DC0-89C1-5EC00CEFF2BE" => "Ceph dm-crypt disk in creation", ); +my %parted_mapping = ( + 'linux-swap(v1)' => 'swap', + 'ntfs' => 'ntfs-3g', + ); +my %rev_parted_mapping = reverse %parted_mapping; + sub read_one { my ($hd, $_sector) = @_; @@ -120,8 +126,7 @@ sub read_one { } elsif ($_->{flag} eq 'RECOVERY') { $_->{pt_type} = 0x12; } - $_->{fs_type} = 'swap' if $_->{fs_type} eq 'linux-swap(v1)'; - $_->{fs_type} = 'ntfs-3g' if $_->{fs_type} eq 'ntfs'; + $_->{fs_type} = $parted_mapping{$_->{fs_type}} if $parted_mapping{$_->{fs_type}}; @pt[$_->{part_number}-1] = $_; } @@ -149,8 +154,7 @@ sub write { my ($part) = grep { $_->{start} == $o_start && $_->{size} == $o_size } @$pt; print "($action, $part_number, $o_start, $o_size)\n"; if ($action eq 'add') { - local $part->{fs_type} = 'linux-swap(v1)' if isSwap($part->{fs_type}); - local $part->{fs_type} = 'ntfs' if $part->{fs_type} eq 'ntfs-3g'; + local $part->{fs_type} = $rev_parted_mapping{$part->{fs_type}} if $rev_parted_mapping{$part->{fs_type}}; c::disk_add_partition($hd->{file}, $o_start, $o_size, $part->{fs_type}) or die "failed to add partition #$part_number on $hd->{file}"; my $flag; if (isESP($part)) { -- 2.3.2
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 15987
: 6589 |
6590