diff options
author | Mathew King <mathewk@chromium.org> | 2019-03-13 09:55:53 -0600 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-03-16 15:25:29 -0700 |
commit | d2b18dfbf91e6631516dfedce8bb4bf8696cc288 (patch) | |
tree | d5faf8202c141e55e618741643a2fd58ed39a1ea | |
parent | fa656b63a573c50f62ebdce46f70ee2fa2acbd23 (diff) | |
download | vboot-d2b18dfbf91e6631516dfedce8bb4bf8696cc288.tar.gz |
Show error and wait for 5 seconds to shutdown if setting vendor data fails
BUG=b:128419017
TEST=Tested on arcada by forcing VbExSetVendorData to return an error
and verified that error message is shown
BRANCH=None
Change-Id: I9aa33f88fcb40c1f8d8c60848653654470ac1925
Signed-off-by: Mathew King <mathewk@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1521215
Reviewed-by: Julius Werner <jwerner@chromium.org>
-rw-r--r-- | firmware/lib/vboot_ui.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/firmware/lib/vboot_ui.c b/firmware/lib/vboot_ui.c index 274bf978..5a663c29 100644 --- a/firmware/lib/vboot_ui.c +++ b/firmware/lib/vboot_ui.c @@ -348,11 +348,13 @@ VbError_t vb2_vendor_data_ui(struct vb2_context *ctx) vb2_nv_set(ctx, VB2_NV_DISABLE_DEV_REQUEST, 1); return VBERROR_REBOOT_REQUIRED; } else { - /* - * TODO(mathewk): If setting vendor data fails - * we should give helpful feedback to the user - */ - return ret; + vb2_error_notify( + "ERROR: Vendor data was not set.\n" + "System will now shutdown\n", + NULL, + VB_BEEP_FAILED); + VbExSleepMs(5000); + return VBERROR_SHUTDOWN_REQUESTED; } default: VB2_DEBUG("Vendor Data UI - pressed key %d\n", key); |