Re: Linux & FAT32 label

From: Karel Zak
Date: Thu Nov 09 2017 - 06:04:27 EST


On Thu, Nov 09, 2017 at 09:59:09AM +0100, Pali Rohár wrote:
> What about exporting e.g. BOOT_LABEL field from libblkid for vfat disks?
> LABEL (which is shown to user, e.g. in GUI) would be that one from root
> directory (same which is used by label on MS-DOS and Windows) and
> BOOT_LABEL would be from boot sector. If somebody really needs to know
> current label stored in boot sector he would be able to do it via blkid.
> Also it would be possible then via blkid to read exact label stored in
> root directory and also read what is stored in boot sector. Because
> currently it is not possible to know from which location LABEL comes
> from.

This is good idea, there is no problem to export additional
information about filesystems. We already use it for another
filesystems too. Note, these details are visible for low-level
probing (blkid -p) and udev only. The high-level API follows
LABEL only.

Maybe it would be better to use LABEL_BOOT= or LABEL_FATBOOT= as name.

The important thing is the default behavior of the LABEL, this is what
use mount(8) and another tools.

Karel

--
Karel Zak <kzak@xxxxxxxxxx>
http://karelzak.blogspot.com