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

Unified Diff: firmware/lib/vboot_firmware.c

Issue 2869022: New rollback_index API. (Closed) Base URL: ssh://git@chromiumos-git/vboot_reference.git
Patch Set: small API change Created 10 years, 6 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
« no previous file with comments | « firmware/lib/rollback_index.c ('k') | firmware/linktest/main.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: firmware/lib/vboot_firmware.c
diff --git a/firmware/lib/vboot_firmware.c b/firmware/lib/vboot_firmware.c
index 11ea6f7772e1c78d9cf8e48ed8f9c5624814be89..c445a81970df363f6db68a3be0a0d0d4ddac4863 100644
--- a/firmware/lib/vboot_firmware.c
+++ b/firmware/lib/vboot_firmware.c
@@ -60,10 +60,12 @@ int LoadFirmware(LoadFirmwareParams* params) {
}
/* Initialize the TPM and read rollback indices. */
- if (0 != RollbackFirmwareSetup(
- (params->boot_flags & BOOT_FLAG_DEVELOPER ? 1 : 0),
- &tpm_key_version, &tpm_fw_version)) {
- VBDEBUG(("Unable to get stored versions.\n"));
+ if (0 != RollbackFirmwareSetup(params->boot_flags & BOOT_FLAG_DEVELOPER)) {
+ VBDEBUG(("Unable to setup TPM.\n"));
+ return LOAD_FIRMWARE_RECOVERY;
+ }
+ if (0 != RollbackFirmwareRead(&tpm_key_version, &tpm_fw_version)) {
+ VBDEBUG(("Unable to read stored versions.\n"));
return LOAD_FIRMWARE_RECOVERY;
}
« no previous file with comments | « firmware/lib/rollback_index.c ('k') | firmware/linktest/main.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698