Whamcloud - gitweb
libblkid: Add more magic numbers that might mean there is a FAT filesystem
authorTheodore Ts'o <tytso@mit.edu>
Sun, 23 Sep 2007 13:50:11 +0000 (09:50 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 23 Sep 2007 13:50:11 +0000 (09:50 -0400)
commit846be6db813895c354cc54beaa8fa6aba8d98085
tree055e76323c45edfc1fd90f273ddae89d9b73b087
parentd006b8cee78fc415f7c5666af41afdd6ceda42a1
libblkid: Add more magic numbers that might mean there is a FAT filesystem

The FAT filesystem doesn't have its superblock with a set of magic
strings in a fixed location.  Therefore, we must also check for the
FAT filesystem if it looks like we have an MBR at the beginning of the
partition.  We previously checked if the first byte was a jump
instruction but that missed some USB disks with only one bootable
partition.  Now we check for the MBR signature (0x55AA at offset 510)
as well as any partition where byte 0 is \351 or \353.

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/blkid/probe.c