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:
patacongo
2008-08-09 15:55:42 +00:00
parent 8a30c6b64a
commit a88a6ecb67
4 changed files with 190 additions and 6 deletions
+2 -2
View File
@@ -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 */