[Mageia-dev] [soft-commits] [3964] Fix partition numbering on GPT (mga#3091)
Thierry Vignaud
thierry.vignaud at gmail.com
Fri Apr 6 09:58:06 CEST 2012
On 6 April 2012 00:00, <root at mageia.org> wrote:
> Fix partition numbering on GPT (mga#3091)
(...)
> @@ -27,9 +28,20 @@
> $p{start} = $5;
> $p{size} = $7;
> }
> - \%p;
> + $p{part_number} => \%p;
> } c::get_disk_partitions($hd->{file});
>
> + my @pt = map {
> + my $part_number = $_;
> + if ($parts{$part_number}) {
> + $parts{$part_number};
> + } else {
> + my %p;
> + $p{part_number} = $part_number;
> + \%p;
This is simpler & more readable:
{ part_number => $part_number };
anyway it would be maybe simpler go one of the way I attach.
WDYT?
> [ @pt ], $info;
And this could be better:
\@pt, $info;
BTW, a "require common" would be needed b/c of common::sync() even
if all users already loaded it before, for sanity & perl_checker.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1.diff
Type: application/octet-stream
Size: 534 bytes
Desc: not available
URL: </pipermail/mageia-dev/attachments/20120406/427b6f6a/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2.diff
Type: application/octet-stream
Size: 547 bytes
Desc: not available
URL: </pipermail/mageia-dev/attachments/20120406/427b6f6a/attachment-0001.obj>
More information about the Mageia-dev
mailing list