summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}
}