<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>25517</bug_id>
          
          <creation_ts>2011-04-26 13:48:20 +0400</creation_ts>
          <short_desc>Игнорирует поле &quot;Number Of Partition Entries&quot; в  GPT таблицах.</short_desc>
          <delta_ts>2011-04-26 23:42:01 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>parted</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>24675</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Andriy Stepanov (stanv)">stanv</reporter>
          <assigned_to name="Anton Farygin">rider</assigned_to>
          <cc>rider</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>120784</commentid>
    <comment_count>0</comment_count>
    <who name="Andriy Stepanov (stanv)">stanv</who>
    <bug_when>2011-04-26 13:48:20 +0400</bug_when>
    <thetext>parted-2.3-alt3

Игнорирует поле &quot;Number of partition entries&quot; в таблице 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-&gt;disk_specific;
   uint32_t p_ent_size = PED_LE32_TO_CPU (gpt-&gt;SizeOfPartitionEntry);
-  *ptes_bytes = p_ent_size * gpt_disk_data-&gt;entry_count;
+  *ptes_bytes = p_ent_size * PED_LE32_TO_CPU(gpt-&gt;NumberOfPartitionEntries);
   size_t ptes_sectors = ped_div_round_up (*ptes_bytes,
                                           disk-&gt;dev-&gt;sector_size);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120820</commentid>
    <comment_count>1</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2011-04-26 23:42:01 +0400</bug_when>
    <thetext>parted-2.3-alt4 -&gt; sisyphus:

* Tue Apr 26 2011 Valery Inozemtsev &lt;shrek@altlinux&gt; 2.3-alt4
- GPT: fixed pte handling (closes: #25517)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>