Truncate FAT filesystem label until 1st occurance of a blank (0x20)
authorMirko Vogt <mirko-openwrt@nanl.de>
Sat, 25 Apr 2020 23:47:50 +0000 (01:47 +0200)
committerJohn Crispin <john@phrozen.org>
Wed, 6 May 2020 06:50:42 +0000 (08:50 +0200)
commitcddd902cc165e0af01469d1cb8defd9b1366093f
treef22d8067ba190fa4c9e032b9b03fcbcfa284fcdb
parent8b9e601160712f74ff46313579d0225a7f90ca3c
Truncate FAT filesystem label until 1st occurance of a blank (0x20)

According to spec the FAT filesystem label is not terminated by a
\0-byte but instead has a fixed length where the name is padded by
blanks.
Before libblkid-tiny just passed the always 11 bytes long blank padded
string through, however it makes matching for a filesystem label
inconsistent with other filesystems, which use a \0-terminated string.

Before: "foobar     "
After : "foobar"

Signed-off-by: Mirko Vogt <mirko-openwrt@nanl.de>
libblkid-tiny/vfat.c