git: gpt(8): Improve utf16_to_utf8()

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


commit 368966d6842e407edd185dc8178adfe3d60117c4
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/368966d6842e407edd185dc8178adfe3d60117c4


-- 
DragonFly BSD source repository


More information about the Commits mailing list