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

Unified Diff: cgpt/cmd_boot.c

Issue 5115002: Fixing the bug of CGPT when primary entry table is invalid. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git
Patch Set: Created 10 years, 1 month 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
« cgpt/cmd_add.c ('K') | « cgpt/cmd_add.c ('k') | cgpt/cmd_find.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cgpt/cmd_boot.c
diff --git a/cgpt/cmd_boot.c b/cgpt/cmd_boot.c
index 56ab1d580848e89d145e395148d7b153fa849314..669e9ae7dfc0b265acb7b7da7e163c6cf10368df 100644
--- a/cgpt/cmd_boot.c
+++ b/cgpt/cmd_boot.c
@@ -132,7 +132,7 @@ int cmd_boot(int argc, char *argv[]) {
}
uint32_t index = partition - 1;
- GptEntry *entry = GetEntry(&drive.gpt, PRIMARY, index);
+ GptEntry *entry = GetEntry(&drive.gpt, ANY_VALID, index);
memcpy(&drive.pmbr.boot_guid, &entry->unique, sizeof(Guid));
}
« cgpt/cmd_add.c ('K') | « cgpt/cmd_add.c ('k') | cgpt/cmd_find.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698