summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDivya Chellap <divya.chellappa@intel.com>2017-09-20 12:10:26 +0530
committerchrome-bot <chrome-bot@chromium.org>2017-10-05 03:04:15 -0700
commite95ceff307f6c5c457f3e805991804ae2c7cb50c (patch)
treec9ac67df0a7ff60002851d9447da24fcc212b41a
parente0a9a13c82b3e9fbba21250be116de5b13d2a974 (diff)
downloadvboot-e95ceff307f6c5c457f3e805991804ae2c7cb50c.tar.gz
vboot: Handle power button press in broken screen
power button press is not being handled in broken screen (VB_SCREEN_OS_BROKEN) if the user wants to exit out of it. BUG=none BRANCH=none TEST=verified power button key functionality in broken screen in Soraka board Change-Id: I64cbb79479e3e0579aeec4e87894441acf26c9fa Signed-off-by: Divya Chellap <divya.chellappa@intel.com> Reviewed-on: https://chromium-review.googlesource.com/674886 Commit-Ready: Divya Chellappa <divya.chellappa@intel.com> Tested-by: Divya Chellappa <divya.chellappa@intel.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Subrata Banik <subrata.banik@intel.com>
-rw-r--r--firmware/lib/vboot_ui_menu.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/firmware/lib/vboot_ui_menu.c b/firmware/lib/vboot_ui_menu.c
index 6f43f151..cacee432 100644
--- a/firmware/lib/vboot_ui_menu.c
+++ b/firmware/lib/vboot_ui_menu.c
@@ -1060,9 +1060,14 @@ VbError_t vb2_recovery_menu(struct vb2_context *ctx, VbCommonParams *cparams)
VbDisplayScreen(ctx, cparams, VB_SCREEN_OS_BROKEN, 0);
VB2_DEBUG("waiting for manual recovery\n");
while (1) {
- VbCheckDisplayKey(ctx, cparams, VbExKeyboardRead());
- if (VbWantShutdownMenu(cparams->gbb->flags))
+ key = VbExKeyboardRead();
+ if (key == VB_BUTTON_POWER)
return VBERROR_SHUTDOWN_REQUESTED;
+ else {
+ VbCheckDisplayKey(ctx, cparams, key);
+ if (VbWantShutdownMenu(cparams->gbb->flags))
+ return VBERROR_SHUTDOWN_REQUESTED;
+ }
VbExSleepMs(REC_KEY_DELAY);
}
}