summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include/libpayload.h
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2015-08-12 18:49:50 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-09-08 11:51:55 +0000
commitccda446e5204c99a98867f93113eea2a71b1c4c4 (patch)
tree69972ac95527a2057f98b5f4a893d38bf3492b24 /payloads/libpayload/include/libpayload.h
parentabe03d25e2890eec96df5b8e8372a9b5a1ffd1d0 (diff)
downloadcoreboot-ccda446e5204c99a98867f93113eea2a71b1c4c4.tar.xz
video_printf: align text
This change allows video_printf to left/center/right-align text depending on the enum value provided by the caller. This is useful especially because usually the length of formatted string is unknown before calling video_printf. BUG=none BRANCH=smaug TEST=drew fastboot screens on Smaug CQ-DEPEND=CL:296460 Reviewed-on: https://chromium-review.googlesource.com/292929 Reviewed-by: Aaron Durbin <adurbin@chromium.org> (cherry picked from commit 436f05f60c1b88626740a35913e3ad37b5c777a3) Change-Id: If1d50b7d8ddaa86eddc1618946756184cb87bfe1 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/295413 Reviewed-on: http://review.coreboot.org/11583 Tested-by: build bot (Jenkins)
Diffstat (limited to 'payloads/libpayload/include/libpayload.h')
-rw-r--r--payloads/libpayload/include/libpayload.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h
index 3ae3590558..470aafab5a 100644
--- a/payloads/libpayload/include/libpayload.h
+++ b/payloads/libpayload/include/libpayload.h
@@ -210,7 +210,14 @@ void video_console_set_cursor(unsigned int cursorx, unsigned int cursory);
* print characters on video console with colors. note that there is a size
* restriction for the internal buffer. so, output string can be truncated.
*/
-void video_printf(int foreground, int background, const char *fmt, ...);
+enum video_printf_align {
+ VIDEO_PRINTF_ALIGN_KEEP = 0,
+ VIDEO_PRINTF_ALIGN_LEFT,
+ VIDEO_PRINTF_ALIGN_CENTER,
+ VIDEO_PRINTF_ALIGN_RIGHT,
+};
+void video_printf(int foreground, int background, enum video_printf_align align,
+ const char *fmt, ...);
/** @} */
/**