Bug 25517 - Игнорирует поле "Number Of Partition Entries" в GPT таблицах.
Summary: Игнорирует поле "Number Of Partition Entries" в GPT таблицах.
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: parted (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Anton Farygin
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks: 24675
  Show dependency tree
 
Reported: 2011-04-26 13:48 MSK by Andriy Stepanov (stanv)
Modified: 2011-04-26 23:42 MSK (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andriy Stepanov (stanv) 2011-04-26 13:48:20 MSK
parted-2.3-alt3

Игнорирует поле "Number of partition entries" в таблице GPT.

И всегда использует значение 128.

Эта проблема всплыла в списке рассылки: bug-parted@gnu.org
http://comments.gmane.org/gmane.comp.gnu.parted.bugs/10173

Патч сводится к:

diff --git a/parted/libparted/labels/gpt.c b/parted/libparted/labels/gpt.c
index 4aedd6d..6bfbee4 100644
--- a/parted/libparted/labels/gpt.c
+++ b/parted/libparted/labels/gpt.c
@@ -569,7 +569,7 @@ gpt_read_PE_array (PedDisk const *disk, GuidPartitionTableHeader_t const *gpt,
 {
   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);
Comment 1 Repository Robot 2011-04-26 23:42:01 MSK
parted-2.3-alt4 -> sisyphus:

* Tue Apr 26 2011 Valery Inozemtsev <shrek@altlinux> 2.3-alt4
- GPT: fixed pte handling (closes: #25517)