summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarnali Sarkar <barnali.sarkar@intel.com>2017-12-06 18:37:09 +0530
committerchrome-bot <chrome-bot@chromium.org>2017-12-11 03:11:03 -0800
commit805726997cc7c3a95b1fd24de5e6909712e4f11c (patch)
tree5337aea0556f4ccc34c64cf90958117285ca65ed
parenteb13c06d2ba27f09996168409472cade82807414 (diff)
downloadvboot-805726997cc7c3a95b1fd24de5e6909712e4f11c.tar.gz
vboot: Fix INSERT screen error when valid Kernel USB is not inserted
In Recovery Mode, when an USB key is inserted where valid OS is not present, it shows "VB_SCREEN_RECOVERY_NO_GOOD" screen. But, once removing that USB key, the screen should go back to INSERT screen again. This functionality was not working after the below Commit - I2bab22fcbb0bb3cdfffe585eb633231ba8015fc3 This patch fixes this issue by assigning the current_menu as "VB_MENU_RECOVERY_INSERT" every time when there is No Disk found. BUG=none BRANCH=none TEST=Tested on Soraka to check that INSERT screen comes back once Non-Valid OS Pendrive is removed from board. Change-Id: I74efff562ba00a3e96b82ee158f9613f53c059b5 Signed-off-by: Barnali Sarkar <barnali.sarkar@intel.com> Reviewed-on: https://chromium-review.googlesource.com/810824 Commit-Ready: Rizwan Qureshi <rizwan.qureshi@intel.corp-partner.google.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Shelley Chen <shchen@chromium.org>
-rw-r--r--firmware/lib/vboot_ui_menu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/firmware/lib/vboot_ui_menu.c b/firmware/lib/vboot_ui_menu.c
index 23ef7130..7c636770 100644
--- a/firmware/lib/vboot_ui_menu.c
+++ b/firmware/lib/vboot_ui_menu.c
@@ -1049,8 +1049,10 @@ static VbError_t recovery_ui(struct vb2_context *ctx, VbCommonParams *cparams)
if (current_menu != VB_MENU_RECOVERY ||
current_menu_idx != VB_RECOVERY_DBG_INFO) {
- if (retval == VBERROR_NO_DISK_FOUND)
+ if (retval == VBERROR_NO_DISK_FOUND) {
+ current_menu = VB_MENU_RECOVERY_INSERT;
vb2_draw_current_screen(ctx, cparams);
+ }
else {
VbDisplayScreen(ctx, cparams,
VB_SCREEN_RECOVERY_NO_GOOD,