diff options
author | Mathew King <mathewk@chromium.org> | 2020-04-20 16:04:15 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-04-20 22:35:04 +0000 |
commit | 28c6bab2b3050ff9cdd9ed264e396d2602998923 (patch) | |
tree | 7f5cc1b8f04950d0809f159a44be7fc0d20f7179 | |
parent | aa7e5d8a8b0900c3c41d6c12fbd9cf4a09d3a1a1 (diff) | |
download | vboot-28c6bab2b3050ff9cdd9ed264e396d2602998923.tar.gz |
vboot: Switch key to exit RMA to ctrl+sfirmware-drallion-12930.B
Make the key that exits the RMA process ctrl+s instead of esc so that it
is less likely that the user will leave without setting the RMA data.
BUG=b:138812835
TEST=emerge-drallion depthcharge chromeos-bootimage
ctrl+s exits RMA
BRANCH=drallion
Signed-off-by: Mathew King <mathewk@chromium.org>
Change-Id: Ia9b4f3492a3569fd93e0ea0cc70a305f42bed955
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2157896
Reviewed-by: Simon Glass <sjg@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
-rw-r--r-- | firmware/lib/vboot_ui_legacy_wilco.c | 6 | ||||
-rw-r--r-- | tests/vboot_legacy_clamshell_tests.c | 22 |
2 files changed, 7 insertions, 21 deletions
diff --git a/firmware/lib/vboot_ui_legacy_wilco.c b/firmware/lib/vboot_ui_legacy_wilco.c index 2971a1bc..bbfd9aff 100644 --- a/firmware/lib/vboot_ui_legacy_wilco.c +++ b/firmware/lib/vboot_ui_legacy_wilco.c @@ -61,9 +61,9 @@ static vb2_error_t vb2_enter_vendor_data_ui(struct vb2_context *ctx, case 0: /* Nothing pressed */ break; - case VB_KEY_ESC: - /* Escape pressed - return to developer screen */ - VB2_DEBUG("Vendor Data UI - user pressed Esc: " + case VB_KEY_CTRL('S'): + /* Ctrl+S pressed - return to developer screen */ + VB2_DEBUG("Vendor Data UI - user pressed Ctrl+S: " "exit to Developer screen\n"); data_value[0] = '\0'; return VB2_SUCCESS; diff --git a/tests/vboot_legacy_clamshell_tests.c b/tests/vboot_legacy_clamshell_tests.c index 0d5594a1..9bfc1736 100644 --- a/tests/vboot_legacy_clamshell_tests.c +++ b/tests/vboot_legacy_clamshell_tests.c @@ -918,7 +918,7 @@ static void VbBootDevVendorDataTest(void) mock_keypress[5] = VB_KEY_ENTER; /* Set vendor data */ mock_keypress[6] = VB_KEY_RIGHT; /* Select NO */ mock_keypress[7] = VB_KEY_ENTER; /* Do not confirm vendor data */ - mock_keypress[8] = VB_KEY_ESC; /* Escape to boot */ + mock_keypress[8] = VB_KEY_CTRL('S'); /* Ctrl+S to boot */ vbtlk_expect_fixed = 1; TEST_EQ(VbBootDeveloperLegacyClamshell(ctx), VB2_ERROR_MOCK, "Enter set vendor data, don't confirm, esc"); @@ -1072,7 +1072,7 @@ static void VbBootDevVendorDataTest(void) mock_keypress[4] = VB_KEY_ENTER; /* Confirm vendor data (nothing happens) */ mock_keypress[5] = VB_KEY_ENTER; - mock_keypress[6] = VB_KEY_ESC; + mock_keypress[6] = VB_KEY_CTRL('S'); vbtlk_expect_fixed = 1; TEST_EQ(VbBootDeveloperLegacyClamshell(ctx), VB2_ERROR_MOCK, "Enter set vendor data too short"); @@ -1081,7 +1081,7 @@ static void VbBootDevVendorDataTest(void) /* Enter set vendor data; esc from set screen */ ResetMocks(); ctx->flags |= VB2_CONTEXT_VENDOR_DATA_SETTABLE; - mock_keypress[1] = VB_KEY_ESC; + mock_keypress[1] = VB_KEY_CTRL('S'); vbtlk_expect_fixed = 1; TEST_EQ(VbBootDeveloperLegacyClamshell(ctx), VB2_ERROR_MOCK, "Enter set vendor data esc from set screen"); @@ -1094,26 +1094,12 @@ static void VbBootDevVendorDataTest(void) mock_keypress[2] = '3'; mock_keypress[3] = '2'; mock_keypress[4] = '1'; - mock_keypress[5] = VB_KEY_ESC; + mock_keypress[5] = VB_KEY_CTRL('S'); vbtlk_expect_fixed = 1; TEST_EQ(VbBootDeveloperLegacyClamshell(ctx), VB2_ERROR_MOCK, "Enter set vendor data esc from set screen with tag"); TEST_EQ(set_vendor_data_called, 0, " VbExSetVendorData() not called"); - /* Enter set vendor data; esc from confirm screen */ - ResetMocks(); - ctx->flags |= VB2_CONTEXT_VENDOR_DATA_SETTABLE; - mock_keypress[1] = '4'; - mock_keypress[2] = '3'; - mock_keypress[3] = '2'; - mock_keypress[4] = '1'; - mock_keypress[5] = VB_KEY_ENTER; /* Set vendor data */ - mock_keypress[6] = VB_KEY_ESC; - vbtlk_expect_fixed = 1; - TEST_EQ(VbBootDeveloperLegacyClamshell(ctx), VB2_ERROR_MOCK, - "Enter set vendor data esc from set screen"); - TEST_EQ(set_vendor_data_called, 0, " VbExSetVendorData() not called"); - VB2_DEBUG("...done.\n"); } |