summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShelley Chen <shchen@google.com>2020-08-17 00:52:47 -0700
committerCommit Bot <commit-bot@chromium.org>2020-09-24 02:20:42 +0000
commita2291a962395440966a9aac2c241d46e07f23e2d (patch)
treee57aceaeeda1a2978652c56abce4e05086134faa
parent6c15b6cfb29082147e93b3c9e510a796a8d85a75 (diff)
downloadvboot-a2291a962395440966a9aac2c241d46e07f23e2d.tar.gz
firmware/2lib: Add error message for ctrl-U when usb boot is not enabled
Currently, we only have a beep when the user presses ctrl-u. Adding an error message to clarify what the error is. BUG=b:164944674 BRANCH=puff, zork TEST=boot into developer mode make sure "boot from external disk" doesn't appear press ctrl+U and make sure dialog box with error appears Cq-Depend: chromium:2359765 Signed-off-by: Shelley Chen <shchen@google.com> Change-Id: Id8fad79802cb61883758e8c7561163cc17fb0f87 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2359768 Tested-by: Shelley Chen <shchen@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-by: Joel Kitching <kitching@chromium.org> Commit-Queue: Shelley Chen <shchen@chromium.org>
-rw-r--r--firmware/2lib/2ui_screens.c1
-rw-r--r--firmware/2lib/include/2api.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/firmware/2lib/2ui_screens.c b/firmware/2lib/2ui_screens.c
index a398aa45..ec5aa08a 100644
--- a/firmware/2lib/2ui_screens.c
+++ b/firmware/2lib/2ui_screens.c
@@ -711,6 +711,7 @@ vb2_error_t vb2_ui_developer_mode_boot_external_action(
!vb2_dev_boot_external_allowed(ui->ctx)) {
VB2_DEBUG("ERROR: Dev mode external boot not allowed\n");
ui->error_beep = 1;
+ ui->error_code = VB2_UI_ERROR_EXTERNAL_BOOT_NOT_ENABLED;
return VB2_REQUEST_UI_CONTINUE;
}
diff --git a/firmware/2lib/include/2api.h b/firmware/2lib/include/2api.h
index 323b91c9..6b95204b 100644
--- a/firmware/2lib/include/2api.h
+++ b/firmware/2lib/include/2api.h
@@ -1336,6 +1336,8 @@ enum vb2_ui_error {
VB2_UI_ERROR_TO_NORM_NOT_ALLOWED,
/* Debug info screen initialization failed */
VB2_UI_ERROR_DEBUG_LOG,
+ /* External boot not enabled */
+ VB2_UI_ERROR_EXTERNAL_BOOT_NOT_ENABLED,
/* Firmware log screen initialization failed */
VB2_UI_ERROR_FIRMWARE_LOG,
/* Untrusted confirmation */