summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2011-04-19 13:32:20 -0700
committerVadim Bendebury <vbendeb@chromium.org>2011-04-19 13:32:20 -0700
commitf313ae491529f8de03efa240697eb92747b0b21a (patch)
tree4931d8437824ca01c4b001dda4a29e329bb92388
parent85b5c88a9f97d0a47f60927337d532fe0766f180 (diff)
downloadvboot-f313ae491529f8de03efa240697eb92747b0b21a.tar.gz
Process case of corrupted firmware explicitly.
Add the missing return statement to allow to tell between different recovery reasons on legacy firmware. Change-Id: I287e9d91dde040dd0edbe23422dc8914f81cc9f2 BUG=chromium-os:14295 TEST=manual On a system with a chromeOS Flash USB drive plugged in: - preserve currently running firmware - corrupt both RW firmware sections - restart the system (it comes up in recovery mode) - login - run `crossystem recovery_reason' and observe the result: it used to print '66' before the fix, prints '3' after the fix. - restore the firmware Review URL: http://codereview.chromium.org/6879051
-rw-r--r--host/arch/x86/lib/crossystem_arch.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/host/arch/x86/lib/crossystem_arch.c b/host/arch/x86/lib/crossystem_arch.c
index 2b5654b8..9f766949 100644
--- a/host/arch/x86/lib/crossystem_arch.c
+++ b/host/arch/x86/lib/crossystem_arch.c
@@ -392,6 +392,7 @@ static int VbGetRecoveryReason(void) {
case BINF0_RECOVERY_DEV_SCREEN_KEY:
return VBNV_RECOVERY_RW_DEV_SCREEN;
case BINF0_RECOVERY_RW_FW_BAD:
+ return VBNV_RECOVERY_RO_INVALID_RW;
case BINF0_RECOVERY_NO_OS:
return VBNV_RECOVERY_RW_NO_OS;
case BINF0_RECOVERY_BAD_OS: