Skip to content
Commit 08f622a1 authored by Christian Taedcke's avatar Christian Taedcke Committed by Tom Rini
Browse files

fs: fat: calculate FAT type based on cluster count

This fixes an issue where the FAT type (FAT12, FAT16) is not
correctly detected, e.g. when the BPB field BS_FilSysType contains the
valid value "FAT     ".

According to the FAT spec the field BS_FilSysType has only
informational character and does not determine the FAT type.

The logic of this code is based on the linux kernel implementation
from the file fs/fat/inode.c function fat_fill_super().

For details about FAT see http://elm-chan.org/docs/fat_e.html



Signed-off-by: default avatarChristian Taedcke <christian.taedcke@weidmueller.com>
parent 601d33f3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment