[parted-devel] [PATCH 01/10] Fix gpt_read to read all of the partition entries correctly.

Joel Granados jgranado at redhat.com
Thu Jun 11 09:08:17 UTC 2009


On Wed, Jun 10, 2009 at 08:51:26PM +0200, Jim Meyering wrote:
> Joel Granados Moreno wrote:
> > From: Matthew S. Harris <mharris312 at gmail.com>
> >
> > * libparted/labels/gpt.c (gpt_read): Use the SizeOfPartitionEntry
> > field value when reading the partition entries rather than assuming
> > that the entries are the same size as our struct.
> >
> > * libparted/labels/gpt.c (gpt_read): When reading the partition
> > entries, round up, not down, the number of sectors to read.
> >
> > * libparted/labels/gpt.c (_header_is_valid): Check that the
> > SizeOfPartitionEntry is sane.
> 
> Thanks!  This looks good now.
> 
> Changes I'm making:
> 
>   - I'm listing Matthew as the author.
>   - adjust log not to repeat the same file name 3 times:
> 
> gpt: fix gpt_read to read all of the partition entries correctly
> 
> * libparted/labels/gpt.c (gpt_read): Use the SizeOfPartitionEntry
> field value when reading the partition entries rather than assuming
> that the entries are the same size as our struct.
> (gpt_read): When reading the partition
> entries, round up, not down, the number of sectors to read.
> (_header_is_valid): Check that the SizeOfPartitionEntry is sane.
> With minor adjustments by Joel Granados Moreno.

Ack, I skipped this because it was something that I had not worked on.

-- 
Joel Andres Granados
Brno, Czech Republic, Red Hat.



More information about the parted-devel mailing list