OSDN Git Service

gpt: don't misbehave with e.g., a 9-entry partition array
authorJim Meyering <meyering@redhat.com>
Thu, 3 Nov 2011 12:51:40 +0000 (13:51 +0100)
committerJim Meyering <meyering@redhat.com>
Thu, 3 Nov 2011 21:09:16 +0000 (22:09 +0100)
commitce85c5145ed5e267eacee338204cc777377e6b02
tree9dc62d211a5b175f9de4df03c8c00c91b8811ea0
parentbb4e43862127054f2b8744b9d8812cba78912bbb
gpt: don't misbehave with e.g., a 9-entry partition array

* libparted/labels/gpt.c (_generate_header): Correct size of
partition array entries to round up to nearest multiple of
sector size, so that we set gpt->PartitionEntryLBA correctly
also when the number of partition entries is not a multiple
of sector_size / 128.  Problem diagnosed by Robert Herndon
in http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10173.
NEWS
libparted/labels/gpt.c