* libparted/labels/gpt.c (gpt_read_PE_array): When computing the size
of the partition array entry, use the value of "number of partition
array entries" read from a GPT header, not the default of 128 that we
use when creating new headers. Details here:
http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10173
gpt_read_PE_array (PedDisk const *disk, GuidPartitionTableHeader_t const *gpt,
size_t *ptes_bytes)
{
- GPTDiskData *gpt_disk_data = disk->disk_specific;
uint32_t p_ent_size = PED_LE32_TO_CPU (gpt->SizeOfPartitionEntry);
- *ptes_bytes = p_ent_size * gpt_disk_data->entry_count;
+ *ptes_bytes = p_ent_size * PED_LE32_TO_CPU(gpt->NumberOfPartitionEntries);
size_t ptes_sectors = ped_div_round_up (*ptes_bytes,
disk->dev->sector_size);