]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: vfat: Change parsing label in special cases
authorPali Rohár <pali.rohar@gmail.com>
Sat, 25 Nov 2017 11:48:18 +0000 (12:48 +0100)
committerPali Rohár <pali.rohar@gmail.com>
Sat, 25 Nov 2017 11:48:18 +0000 (12:48 +0100)
commitf0ca7e80d7a171701d0d04a3eae22d97f15d0683
tree6f75fa23dd0f16e29383ce49796df1c23a98129b
parentd1bf0ce5faac608d62e2b8a0bcd3ef95c853a883
libblkid: vfat: Change parsing label in special cases

* Use only label from the root directory and do not fallback to the label
  stored in boot sector. This is how MS-DOS 6.22, MS-DOS 7.10, Windows 98,
  Windows XP and also Windows 10 behave. Moreover Windows XP and Windows 10
  do not touch label in boot sector anymore, so removing FAT label on those
  Windowses leads to having old label still stored in boot sector (which
  MS-DOS and Windows fully ignore).

* Label entry "NO NAME" in root directory is treated as label "NO NAME"
  instead of empty label. In root directory it has no special meaning.
  String "NO NAME" has a special meaning (empty label) only for label
  stored in boot sector.

* Label from the boot sector is now stored into LABEL_FATBOOT field. So if
  there are applications which depends or needs to read this label, they
  have ability.

After this change LABEL always correspondent to the label from the root
directory and LABEL_FATBOOT to the label stored in the boot sector. If some
of those labels is missing or is not present (e.g. "NO LABEL" in boot
sector) then particular field is not set.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
libblkid/src/superblocks/vfat.c