[Mageia-dev] [soft-commits] [3964] Fix partition numbering on GPT (mga#3091)

Pascal Terjan pterjan at gmail.com
Fri Apr 6 13:17:44 CEST 2012


On Fri, Apr 6, 2012 at 12:07, Pascal Terjan <pterjan at gmail.com> wrote:

>
>
> On Fri, Apr 6, 2012 at 09:34, Guillaume Rousse <guillomovitch at gmail.com>wrote:
>
>>
>> What about using consistent variable names ? If you have a collection of
>> 'something' stored in a hash, why should it suddenly became of collection
>> of 'st' when transfering them into an array ?
>
>
> In this case, the hash contains the existing partitions, hence %parts,
> while the array represents the full partition table, hence @pt
>
> Or using a consistent format for variables storing numbers, rather than
>> having both nb_foo and bar_number ?
>>
>
> nb_primary is the number of primary partitions (count if you prefer),
> part_number is the position of a given partition in the table.
>
>
>>
>> And I don't underestand the interest of using an hash for storing content
>> with numerical indexes only. Especially if you have to convert it to an
>> array at the end...
>
>
> To easily get the (potential) one with current index when filling the
> array. The other solution would be to first create the array with 128
> default structures, then replace some of them.
>

Hmm or actually just put them in the array and then fill the holes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-dev/attachments/20120406/bc00b39d/attachment.html>


More information about the Mageia-dev mailing list