diff options
| author | Christian Taedcke <[email protected]> | 2023-11-15 13:44:18 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-11-28 20:10:24 -0500 |
| commit | 08f622a12708a0a787c8345532e0b1665b993cab (patch) | |
| tree | cb779c9738d596dcb1b5539c10524ff41db372db /include | |
| parent | 601d33f31aebf5b76053c501a91a43e0840b1913 (diff) | |
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: Christian Taedcke <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/fat.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/include/fat.h b/include/fat.h index a9756fb4cd1..3dce99a23cf 100644 --- a/include/fat.h +++ b/include/fat.h @@ -34,12 +34,6 @@ struct disk_partition; /* Maximum number of entry for long file name according to spec */ #define MAX_LFN_SLOT 20 -/* Filesystem identifiers */ -#define FAT12_SIGN "FAT12 " -#define FAT16_SIGN "FAT16 " -#define FAT32_SIGN "FAT32 " -#define SIGNLEN 8 - /* File attributes */ #define ATTR_RO 1 #define ATTR_HIDDEN 2 |
