mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
Add FAT size calculation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@803 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -88,7 +88,7 @@ static inline void mkfatfs_initmbr(FAR struct fat_format_s *fmt,
|
||||
|
||||
/* 1@13: Sectors per allocation unit: 2**n, n=0..7 */
|
||||
|
||||
MBR_PUTSECPERCLUS(var->fv_sect, fmt->ff_clustsize);
|
||||
MBR_PUTSECPERCLUS(var->fv_sect, (1 << fmt->ff_clustshift));
|
||||
|
||||
/* 2@14: Reserved sector count: Usually 32 */
|
||||
|
||||
@@ -250,7 +250,7 @@ static inline void mkfatfs_initfsinfo(FAR struct fat_format_s *fmt,
|
||||
|
||||
/* 4@488: Last free cluster count on volume */
|
||||
|
||||
FSI_PUTFREECOUNT(var->fv_sect, var->fv_clustcount - 1);
|
||||
FSI_PUTFREECOUNT(var->fv_sect, var->fv_nclusters - 1);
|
||||
|
||||
/* 4@492: Cluster number of 1st free cluster */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user