summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include/string.h
diff options
context:
space:
mode:
authorDan Ehrenberg <dehrenberg@chromium.org>2014-11-21 15:50:27 -0800
committerPatrick Georgi <pgeorgi@google.com>2015-03-20 09:59:48 +0100
commit7aebf3269a086b6d4027a0746f8924ad07c92d60 (patch)
tree92db502fca37997a4eb35aa7f532b5edb30bbf43 /payloads/libpayload/include/string.h
parent8bbd04ea8d416b4ec952bf08f572f126ab7b4176 (diff)
downloadcoreboot-7aebf3269a086b6d4027a0746f8924ad07c92d60.tar.xz
libpayload: UTF-16LE to ASCII conversion
This patch adds a simple function to convert a string in UTF-16LE to ASCII. TEST=Ran against a string found in a GPT with the intended outcome BRANCH=none BUG=none Change-Id: I94ec0a32f5712259d3d0caec2233c992330228e3 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 1104db8328a197c7ccf6959a238277f416a2113a Original-Signed-off-by: Dan Ehrenberg <dehrenberg@chromium.org> Original-Change-Id: I50ca5bfdfbef9e084321b2beb1b8d4194ca5af9c Original-Reviewed-on: https://chromium-review.googlesource.com/231456 Original-Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-on: http://review.coreboot.org/8733 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'payloads/libpayload/include/string.h')
-rw-r--r--payloads/libpayload/include/string.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/payloads/libpayload/include/string.h b/payloads/libpayload/include/string.h
index 952261fa15..ca5d5131e2 100644
--- a/payloads/libpayload/include/string.h
+++ b/payloads/libpayload/include/string.h
@@ -69,6 +69,13 @@ char *strerror(int errnum);
/** @} */
/**
+ * @defgroup string Unicode functions
+ * @{
+ */
+char *utf16le_to_ascii(uint16_t *utf16_string, int maxlen);
+/** @} */
+
+/**
* @defgroup string OpenBSD based safe string functions
* @{
*/