summaryrefslogtreecommitdiff
path: root/firmware/lib/vboot_ui_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/lib/vboot_ui_menu.c')
-rw-r--r--firmware/lib/vboot_ui_menu.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/firmware/lib/vboot_ui_menu.c b/firmware/lib/vboot_ui_menu.c
index cacee432..9d6b37d8 100644
--- a/firmware/lib/vboot_ui_menu.c
+++ b/firmware/lib/vboot_ui_menu.c
@@ -1019,7 +1019,7 @@ VbError_t VbBootDeveloperMenu(struct vb2_context *ctx, VbCommonParams *cparams)
* @param cparams Vboot1 common params
* @return VBERROR_SUCCESS, or non-zero error code if error.
*/
-VbError_t vb2_recovery_menu(struct vb2_context *ctx, VbCommonParams *cparams)
+static VbError_t recovery_ui(struct vb2_context *ctx, VbCommonParams *cparams)
{
VbSharedDataHeader *shared =
(VbSharedDataHeader *)cparams->shared_data_blob;
@@ -1031,21 +1031,14 @@ VbError_t vb2_recovery_menu(struct vb2_context *ctx, VbCommonParams *cparams)
VB2_DEBUG("start\n");
- /*
- * If the dev-mode switch is off and the user didn't press the recovery
- * button (recovery was triggerred automatically), show 'broken' screen.
- * The user can either only shutdown to abort or hit esc+refresh+power
- * to initiate recovery as instructed on the screen.
- */
- if (!(shared->flags & VBSD_BOOT_DEV_SWITCH_ON) &&
- !(shared->flags & VBSD_BOOT_REC_SWITCH_ON)) {
+ if (!vb2_allow_recovery(shared->flags)) {
/*
* We have to save the reason here so that it will survive
* coming up three-finger-salute. We're saving it in
* VBNV_RECOVERY_SUBCODE to avoid a recovery loop.
* If we save the reason in VBNV_RECOVERY_REQUEST, we will come
* back here, thus, we won't be able to give a user a chance to
- * reboot to workaround boot hicups.
+ * reboot to workaround a boot hiccup.
*/
VB2_DEBUG("saving recovery reason (%#x)\n",
shared->recovery_reason);
@@ -1253,7 +1246,7 @@ VbError_t vb2_recovery_menu(struct vb2_context *ctx, VbCommonParams *cparams)
VbError_t VbBootRecoveryMenu(struct vb2_context *ctx, VbCommonParams *cparams)
{
- VbError_t retval = vb2_recovery_menu(ctx, cparams);
+ VbError_t retval = recovery_ui(ctx, cparams);
VbDisplayScreen(ctx, cparams, VB_SCREEN_BLANK, 0);
return retval;
}