git: DragonFly_RELEASE_6_4 gpt(8): Improve utf16_to_utf8()

Aaron LI aly at crater.dragonflybsd.org
Sat Feb 21 17:07:06 PST 2026


commit 0bfd094f0a9758e000954a02833be2e457c49329
Author: Aaron LI <aly at aaronly.me>
Date:   Wed Jan 21 13:24:19 2026 +0800

    gpt(8): Improve utf16_to_utf8()
    
    - Let caller pass the buffer and thus avoid memory allocation.
    - Handle the case that there is no NUL termination, i.e., the partition
      name is exactly 36 characters, which is allowed by the specification.
    
    Obtained-from: NetBSD

Summary of changes:
 sbin/gpt/gpt.c  | 36 ++++++++++++++++++++++--------------
 sbin/gpt/gpt.h  |  2 +-
 sbin/gpt/show.c |  9 ++++++---
 3 files changed, 29 insertions(+), 18 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0bfd094f0a9758e000954a02833be2e457c49329


-- 
DragonFly BSD source repository


More information about the Commits mailing list