svn commit: r356032 - head/usr.sbin/fstyp
Takanori Watanabe
takawata at init-main.com
Mon Dec 23 04:33:37 UTC 2019
On Mon, Dec 23, 2019 at 02:41:13AM +0000, Conrad Meyer wrote:
> Author: cem
> Date: Mon Dec 23 02:41:13 2019
> New Revision: 356032
> URL: https://svnweb.freebsd.org/changeset/base/356032
>
> Log:
> fstyp(8): Use iconv(3) to convert NTFS vol labels correctly
>
> Rather than hackily extracting only the ASCII subset of UTF-16LE, go ahead
> and convert the label to the user's locale correctly.
> Modified:
> head/usr.sbin/fstyp/fstyp.c
> head/usr.sbin/fstyp/fstyp.h
> head/usr.sbin/fstyp/ntfs.c
>
Good! The code was part of in-kernel glabel(4) code.
We may convert the code by iconv(9), but iconv(9) requires userland support
and not available on boot time, AFAIK.
So I wrote crude ASCII subset convertion.
Today, UTF-8 based locale is largely accepted. So in-kernel side of the code
may covert fixed UTF-8, assuming devfs encoding as UTF-8.
More information about the freebsd-fs
mailing list