Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Unified Diff: src/platform/vboot_reference/vboot_firmware/lib/cgptlib/cgptlib_internal.c

Issue 2606002: Ignore the AlternateLBA field in the GPT headers. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/platform/vboot_reference/vboot_firmware/lib/cgptlib/cgptlib_internal.c
diff --git a/src/platform/vboot_reference/vboot_firmware/lib/cgptlib/cgptlib_internal.c b/src/platform/vboot_reference/vboot_firmware/lib/cgptlib/cgptlib_internal.c
index 3d2dc0b30591ccef33068ce33e59091e371ad171..8aff0bd7617da9673d945013841612b6cd21e9f9 100644
--- a/src/platform/vboot_reference/vboot_firmware/lib/cgptlib/cgptlib_internal.c
+++ b/src/platform/vboot_reference/vboot_firmware/lib/cgptlib/cgptlib_internal.c
@@ -76,12 +76,12 @@ int CheckHeader(GptHeader *h, int is_secondary, uint64_t drive_sectors) {
* The secondary is at the end of the drive, preceded by its
* entries. */
if (is_secondary) {
- if ((h->my_lba != drive_sectors - 1) || (h->alternate_lba != 1))
+ if (h->my_lba != drive_sectors - 1)
return 1;
if (h->entries_lba != h->my_lba - GPT_ENTRIES_SECTORS)
return 1;
} else {
- if ((h->my_lba != 1) || (h->alternate_lba != drive_sectors - 1))
+ if (h->my_lba != 1)
return 1;
if (h->entries_lba != h->my_lba + 1)
return 1;

Powered by Google App Engine
This is Rietveld 408576698