| ① | root directory sectors: RootDirSectors = ((BPB_RootEntCnt * 32) + (BPB_BytsPerSec – 1)) / BPB_BytsPerSec; /* For FAT32,BPB_RootEntCnt == 0 ,so RootDirSectors is always 0 */ |
| ② | count of sectors in the data region of the volume: If(BPB_FATSz16 != 0) FATSz = BPB_FATSz16; Else FATSz = BPB_FATSz32; If(BPB_TotSec16 != 0) TotSec = BPB_TotSec16; Else TotSec = BPB_TotSec32; DataSec = TotSec – (BPB_ResvdSecCnt + (BPB_NumFATs * FATSz) + RootDirSectors); |
| ③ | count of clusters: CountofClusters = DataSec / BPB_SecPerClus; |
| ④ | If(CountofClusters < 4085) { /* Volume is FAT12 */ } else if(CountofClusters < 65525) { /* Volume is FAT16 */ } else { /* Volume is FAT32 */ } |
FAT file system-FAT Type Determination
最新推荐文章于 2021-01-31 19:43:46 发布
本文详细介绍了FAT文件系统的根目录扇区数量、数据区域扇区数、簇的数量计算方法,并给出了判断FAT12、FAT16及FAT32类型的条件。
5179

被折叠的 条评论
为什么被折叠?



