[File] Inconsistency in serial number presentation FAT vs. NTFS

Christoph Biedl astron.com.bwoj at manchmal.in-ulm.de
Sun Jul 23 15:18:26 UTC 2023


Hello,

see Debian bug report https://bugs.debian.org/1041041 for details.

Summary: For a FAT filesystem, file(1) presents the serial number with
a leading "0x", this is from

    magic/Magdir/filesystems:1439:>>>>>>>>>39       ulelong         x               \b, serial number %#x

For a NTFS filesystem however, it's just a leading zero, from

    magic/Magdir/filesystems:1551:>>>>>>>>>72       ulequad         x               \b, serial number 0%llx

Like the submitter, I have no strong opinion which format to prefer, but
being consistent is a good thing. However, there is a reason for "0x" as
this is also used for ExFAT.

    Christoph


More information about the File mailing list