diff options
author | Hsin-Te Yuan <yuanhsinte@google.com> | 2022-06-30 16:38:40 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-03 00:38:13 +0000 |
commit | 0c357126066949f2b5a66641536547fb372fc3a0 (patch) | |
tree | 6b484e51c3508e8fa901c0478d83863cccd83a22 /tests | |
parent | 9ae9d2c03f42b25238f803a26ebae4902541317e (diff) | |
download | vboot-0c357126066949f2b5a66641536547fb372fc3a0.tar.gz |
2api.c: Initialize display using boot_mode
In vb2api_fw_phase1, use the boot_mode set by vb2_set_boot_mode to
determine whether to initialize display. This fixes the edge case where
VB2_NV_DIAG_REQUEST is set, but vb2api_diagnostic_ui_enabled() is 0.
BUG=none
TEST=make runtests
BRANCH=none
Signed-off-by: Hsin-Te Yuan <yuanhsinte@google.com>
Change-Id: Iecb9f52b056906bcd1d7da324390672adc5112c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3737563
Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/vb2_api_tests.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/vb2_api_tests.c b/tests/vb2_api_tests.c index 15c9bd1f..ff7fa18c 100644 --- a/tests/vb2_api_tests.c +++ b/tests/vb2_api_tests.c @@ -135,8 +135,10 @@ vb2_error_t vb2_fw_init_gbb(struct vb2_context *c) vb2_error_t vb2_check_dev_switch(struct vb2_context *c) { - if (force_dev_mode) + if (force_dev_mode) { + c->flags |= VB2_CONTEXT_DEVELOPER_MODE; sd->flags |= VB2_SD_FLAG_DEV_MODE_ENABLED; + } return retval_vb2_check_dev_switch; } |