aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHeinrich Schuchardt2018-09-20 19:57:54 +0200
committerAlexander Graf2018-09-23 21:55:31 +0200
commit9d08f6db2a130a03282865ded550655b022e5ce7 (patch)
treebe02a5aad78eae897272d97671087a02f8972c84 /include
parent4e6b5d6503ce8f16f00df4aedd137e919026dfad (diff)
efi_loader: remove redundant statement
ascii2unicode() always ends the u16 string with '\0'. Remove redundant assignment. Add description for efi_str_to_u16() and ascii2unicode(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/efi_loader.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 2855c01681a..5d522f133ec 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -411,7 +411,15 @@ efi_status_t efi_dp_split_file_path(struct efi_device_path *full_path,
(((_dp)->type == DEVICE_PATH_TYPE_##_type) && \
((_dp)->sub_type == DEVICE_PATH_SUB_TYPE_##_subtype))
-/* Convert strings from normal C strings to uEFI strings */
+/**
+ * ascii2unicode() - convert ASCII string to UTF-16 string
+ *
+ * A zero terminated ASCII string is converted to a zero terminated UTF-16
+ * string. The output buffer must be preassigned.
+ *
+ * @unicode: preassigned output buffer for UTF-16 string
+ * @ascii: ASCII string to be converted
+ */
static inline void ascii2unicode(u16 *unicode, const char *ascii)
{
while (*ascii)