summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShelley Chen <shchen@chromium.org>2017-08-31 14:10:12 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-09-13 01:50:59 -0700
commit8e0c3e5ad54c3c8442cfec9fe0a3256d16f52892 (patch)
tree3cc3cd812fef26d93f0f7c8c60654dad342418cb
parenta52fc548b4449868b0042acc81dd9fc44cdc9958 (diff)
downloadvboot-8e0c3e5ad54c3c8442cfec9fe0a3256d16f52892.tar.gz
detachables: Power button turns off device on RECOVERY_INSERT screen
BUG=b:64400325 BRANCH=None TEST=boot up into recovery, press power button ensure device shuts down. Change-Id: Ia8e6e91921e81692a2e57b1f77163c656b56ea85 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/646488 Reviewed-by: Julius Werner <jwerner@chromium.org>
-rw-r--r--firmware/lib/vboot_ui_menu.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/firmware/lib/vboot_ui_menu.c b/firmware/lib/vboot_ui_menu.c
index 3bda0c01..89865eeb 100644
--- a/firmware/lib/vboot_ui_menu.c
+++ b/firmware/lib/vboot_ui_menu.c
@@ -1123,16 +1123,6 @@ VbError_t vb2_recovery_menu(struct vb2_context *ctx, VbCommonParams *cparams)
selected = 1;
/*
- * Need to update locale before updating the
- * menu or we'll lose the previous state
- */
- vb2_update_locale(ctx);
-
- ret = vb2_update_menu(ctx);
-
- vb2_set_disabled_idx_mask(shared->flags);
-
- /*
* If user hits power button in
* initial recovery screen (ie:
* because didn't really want to go
@@ -1141,9 +1131,19 @@ VbError_t vb2_recovery_menu(struct vb2_context *ctx, VbCommonParams *cparams)
*/
if (current_menu == VB_MENU_RECOVERY_INSERT) {
ret = VBERROR_SHUTDOWN_REQUESTED;
- }
+ } else {
+ /*
+ * Need to update locale
+ * before updating the menu or
+ * we'll lose the previous state
+ */
+ vb2_update_locale(ctx);
+ ret = vb2_update_menu(ctx);
+ vb2_set_disabled_idx_mask(shared->
+ flags);
+ }
if (current_menu != VB_MENU_RECOVERY ||
current_menu_idx != VB_RECOVERY_DBG_INFO) {
/*