diff options
-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"); } |