git: gpt(8): Improve utf8_to_utf16()

Aaron LI aly at crater.dragonflybsd.org
Wed Feb 18 06:32:41 PST 2026


commit a5d0598a580f6ccb8dcee5282241a42bc7889a4a
Author: Aaron LI <aly at aaronly.me>
Date:   Wed Jan 21 13:29:40 2026 +0800

    gpt(8): Improve utf8_to_utf16()
    
    - No need to NUL-terminate the UTF-16 string when it needs truncation.
    - Pad the remaining characters with zeros. (obtained from NetBSD)

Summary of changes:
 sbin/gpt/gpt.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a5d0598a580f6ccb8dcee5282241a42bc7889a4a


-- 
DragonFly BSD source repository


More information about the Commits mailing list