summaryrefslogtreecommitdiff
path: root/firmware/lib/include
diff options
context:
space:
mode:
authorNick Crews <ncrews@google.com>2018-11-09 15:51:17 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-12-13 19:27:59 -0800
commitf07ea5490bab8a2972e3b6d77ac67ca7cbf5cad0 (patch)
treed20ca2ad75085fe88d0b969428a992ee4efc0811 /firmware/lib/include
parent48d08d76c3cee2fb4ea3a7d965c64550d02f3bbd (diff)
downloadvboot-f07ea5490bab8a2972e3b6d77ac67ca7cbf5cad0.tar.gz
vboot_reference: Merge error beeping, printing, and logging
Added a vb2_error_notify() function that bundles a log message, screen notification message, beep, and flash into one function, since callers were often calling these three things separately. BUG=chromium:899762 TEST=Image still builds and runs on an Aleena, function works on at least one of the calls, the others are harder to test. TEST=make runtests BRANCH=none Change-Id: I82224f8ffa1c326c5e7293a2c00db4dc5d80bf3a Reviewed-on: https://chromium-review.googlesource.com/1330013 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Eugene Hermann <yherman@google.com> Reviewed-by: Nick Crews <ncrews@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'firmware/lib/include')
-rw-r--r--firmware/lib/include/vboot_ui_common.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/firmware/lib/include/vboot_ui_common.h b/firmware/lib/include/vboot_ui_common.h
index 30ade5a6..cc130a67 100644
--- a/firmware/lib/include/vboot_ui_common.h
+++ b/firmware/lib/include/vboot_ui_common.h
@@ -19,6 +19,18 @@ enum vb2_beep_type {
void vb2_error_beep(enum vb2_beep_type beep);
/**
+ * Prints a message to screen, logs a possibly different message to log,
+ * and beeps to notify user.
+ *
+ * @print_msg Display message. NULL message will be ignored.
+ * @log_msg Log message. If NULL, uses @print_msg (if that's not NULL).
+ * @beep Type of beep sound.
+ */
+void vb2_error_notify(const char *print_msg,
+ const char *log_msg,
+ enum vb2_beep_type beep);
+
+/**
* Run alternative firmware if allowed
*
* This will only return if it is not allowed, or the bootloader fails to