[parted-devel] [PATCH 01/10] Fix gpt_read to read all of the partition entries correctly.
Jim Meyering
jim at meyering.net
Wed Jun 10 18:51:26 UTC 2009
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.
More information about the parted-devel
mailing list