vboot: cgpt: Refer to partition entries by entries_lba.
This CL accesses the partition entry array through its header's
Previously, we assume the primary entry array lies on third sector, and
the secondary array lies (1 + 32) sectors from disk end. This assumption
was fine, even Wikipedia assumed the same.
But in order for us to support writing boot code to the third sector (as
required by some Freescale board), the primary entry array must be moved
to another location. Therefore, we must use "entries_lba" to locate the
arrays from now on.
TEST=`cgpt create -p` and then `cgpt show`. Make sure the table
header and entries are properly moved.
Reviewed-by: Bill Richardson <email@example.com>
Tested-by: Bill Richardson <firstname.lastname@example.org>
Commit-Queue: Nam Nguyen <email@example.com>
Tested-by: Nam Nguyen <firstname.lastname@example.org>
9 files changed