Mageia Bugzilla – Attachment 8833 Details for
Bug 19935
Custom disk partitioning requests BIOS boot partition on non-GPT disk
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Patch to fix ordering when telling kernel to add/delete partitions
0001-Renumber-existing-partitions-before-adding-a-new-one.patch (text/plain), 1.49 KB, created by
Martin Whitaker
on 2017-01-04 13:31:38 CET
(
hide
)
Description:
Patch to fix ordering when telling kernel to add/delete partitions
Filename:
MIME Type:
Creator:
Martin Whitaker
Created:
2017-01-04 13:31:38 CET
Size:
1.49 KB
patch
obsolete
>From 3b73af5d27559c8202bb18fc6d085144c4037a34 Mon Sep 17 00:00:00 2001 >From: Martin Whitaker <mageia@martin-whitaker.me.uk> >Date: Wed, 4 Jan 2017 11:31:45 +0000 >Subject: [PATCH 1/2] Renumber existing partitions before adding a new one > (mga#19935). > > >diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm >index 294e180..5cd0ec2 100644 >--- a/perl-install/partition_table.pm >+++ b/perl-install/partition_table.pm >@@ -360,15 +360,17 @@ sub will_tell_kernel { > > push @{$hd->{'will_tell_kernel' . ($o_delay || '')} ||= []}, [ $action, @para ]; > } >- if (!$o_delay) { >- foreach my $delay ('delay_del', 'delay_add') { >- my $l = delete $hd->{"will_tell_kernel$delay"} or next; >- push @{$hd->{will_tell_kernel} ||= []}, @$l; >- } >- } > $hd->{isDirty} = 1; > } > >+sub will_tell_kernel_delayed { >+ my ($hd) = @_; >+ foreach my $delay ('delay_del', 'delay_add') { >+ my $l = delete $hd->{"will_tell_kernel$delay"} or next; >+ push @{$hd->{will_tell_kernel} ||= []}, @$l; >+ } >+} >+ > sub tell_kernel { > my ($hd, $tell_kernel) = @_; > >@@ -493,6 +495,8 @@ sub remove { > assign_device_numbers($hd); > > will_tell_kernel($hd, del => $part); >+ #- schedule renumbering after deleting the partition >+ will_tell_kernel_delayed($hd); > return 1; > } > 0; >@@ -584,6 +588,8 @@ sub add { > } > success: > assign_device_numbers($hd); >+ #- schedule renumbering before adding the partition >+ will_tell_kernel_delayed($hd); > will_tell_kernel($hd, add => $part); > } > >-- >2.10.2 >
From 3b73af5d27559c8202bb18fc6d085144c4037a34 Mon Sep 17 00:00:00 2001 From: Martin Whitaker <mageia@martin-whitaker.me.uk> Date: Wed, 4 Jan 2017 11:31:45 +0000 Subject: [PATCH 1/2] Renumber existing partitions before adding a new one (mga#19935). diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index 294e180..5cd0ec2 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -360,15 +360,17 @@ sub will_tell_kernel { push @{$hd->{'will_tell_kernel' . ($o_delay || '')} ||= []}, [ $action, @para ]; } - if (!$o_delay) { - foreach my $delay ('delay_del', 'delay_add') { - my $l = delete $hd->{"will_tell_kernel$delay"} or next; - push @{$hd->{will_tell_kernel} ||= []}, @$l; - } - } $hd->{isDirty} = 1; } +sub will_tell_kernel_delayed { + my ($hd) = @_; + foreach my $delay ('delay_del', 'delay_add') { + my $l = delete $hd->{"will_tell_kernel$delay"} or next; + push @{$hd->{will_tell_kernel} ||= []}, @$l; + } +} + sub tell_kernel { my ($hd, $tell_kernel) = @_; @@ -493,6 +495,8 @@ sub remove { assign_device_numbers($hd); will_tell_kernel($hd, del => $part); + #- schedule renumbering after deleting the partition + will_tell_kernel_delayed($hd); return 1; } 0; @@ -584,6 +588,8 @@ sub add { } success: assign_device_numbers($hd); + #- schedule renumbering before adding the partition + will_tell_kernel_delayed($hd); will_tell_kernel($hd, add => $part); } -- 2.10.2
View Attachment As Raw
Actions:
View
Attachments on
bug 19935
:
8765
|
8798
|
8804
|
8830
| 8833 |
8834