summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2011-03-15 19:20:25 -0700
committerRandall Spangler <rspangler@chromium.org>2011-03-15 19:20:25 -0700
commit0222355d8af3ec1ae3d7d63cec45f47a16a28262 (patch)
tree3cff66b28005de356f863037f9d06c92af782eb8
parent61388bb53ebbad41b4aca1f4a9b5966f953aad6b (diff)
downloadvboot-0222355d8af3ec1ae3d7d63cec45f47a16a28262.tar.gz
Fix LoadKernel() not returning LOAD_KERNEL_RECOVERY
Change-Id: Ib147be7442b93ef429a9796e2b76bee27347e0b3 R=adlr@chromium.org BUG=13150 TEST=manual On a current firmware (0052G1+), use 'crossystem vbtest_errfunc=3 vbtest_errno=3' to force a reboot to recovery mode. Then use 'crossystem recovery_reason' to check the recovery reason. It should be 71. It's not. (You'll get a range of other error reasons due to a different firmware bug.) Review URL: http://codereview.chromium.org/6670040
-rw-r--r--firmware/lib/vboot_kernel.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/firmware/lib/vboot_kernel.c b/firmware/lib/vboot_kernel.c
index 84f6615c..83fb3fed 100644
--- a/firmware/lib/vboot_kernel.c
+++ b/firmware/lib/vboot_kernel.c
@@ -139,10 +139,7 @@ int LoadKernel(LoadKernelParams* params) {
uint32_t test_err = 0;
uint32_t status;
- /* TODO: differentiate between finding an invalid kernel (found_partitions>0)
- * and not finding one at all. Right now we treat them the same, and return
- * LOAD_KERNEL_INVALID for both. */
- int retval = LOAD_KERNEL_INVALID;
+ int retval = LOAD_KERNEL_RECOVERY;
int recovery = VBNV_RECOVERY_RO_UNSPECIFIED;
/* Setup NV storage */
@@ -542,6 +539,11 @@ int LoadKernel(LoadKernelParams* params) {
/* Success! */
retval = LOAD_KERNEL_SUCCESS;
+ } else {
+ /* TODO: differentiate between finding an invalid kernel
+ * (found_partitions>0) and not finding one at all. Right now we
+ * treat them the same, and return LOAD_KERNEL_INVALID for both. */
+ retval = LOAD_KERNEL_INVALID;
}
LoadKernelExit: