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

Unified Diff: firmware/lib/rollback_index.c

Issue 3470013: Move initialization of g_recovery_mode. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git
Patch Set: version change Created 10 years, 3 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 | « no previous file | firmware/version.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: firmware/lib/rollback_index.c
diff --git a/firmware/lib/rollback_index.c b/firmware/lib/rollback_index.c
index ebf6fb026fa26b5cd27085bb0f1b12b4cdf1bec1..de1035bf5f2b3ab1114c5b8443ff97263d771339 100644
--- a/firmware/lib/rollback_index.c
+++ b/firmware/lib/rollback_index.c
@@ -184,6 +184,10 @@ uint32_t SetupTPM(int recovery_mode, int developer_mode,
VBDEBUG(("TPM: SetupTPM(r%d, d%d)\n", recovery_mode, developer_mode));
+ if (recovery_mode)
+ g_rollback_recovery_mode = 1; /* Global variables are usable in
+ * recovery mode */
+
/* TODO: TlclLibInit() should be able to return failure */
TlclLibInit();
@@ -241,10 +245,6 @@ uint32_t SetupTPM(int recovery_mode, int developer_mode,
/* Updates flags */
if (developer_mode)
new_flags |= FLAG_LAST_BOOT_DEVELOPER;
- if (recovery_mode)
- g_rollback_recovery_mode = 1; /* Global variables are usable in
- * recovery mode */
-
if (rsf->flags != new_flags) {
rsf->flags = new_flags;
rsf_dirty = 1;
« no previous file with comments | « no previous file | firmware/version.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698