On 6 April 2012 00:00,  <[email protected]> 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.

Attachment: 1.diff
Description: Binary data

Attachment: 2.diff
Description: Binary data

Reply via email to