diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-08-05 23:52:44 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-08-05 23:52:44 +0000 |
commit | cd84f3dbe66739cf803208b163bda227e2fcff64 (patch) | |
tree | d4bae8e508edabfbd5dc49305699b8244a406241 /nuttx/fs/fat/fs_fat32util.c | |
parent | a3faf4085e5b1cde0c452ac6e9125f98fd6614f3 (diff) | |
download | px4-nuttx-cd84f3dbe66739cf803208b163bda227e2fcff64.tar.gz px4-nuttx-cd84f3dbe66739cf803208b163bda227e2fcff64.tar.bz2 px4-nuttx-cd84f3dbe66739cf803208b163bda227e2fcff64.zip |
Continued mkfatfs work
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@802 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/fat/fs_fat32util.c')
-rw-r--r-- | nuttx/fs/fat/fs_fat32util.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/nuttx/fs/fat/fs_fat32util.c b/nuttx/fs/fat/fs_fat32util.c index 2a52aa4aa..daa740ece 100644 --- a/nuttx/fs/fat/fs_fat32util.c +++ b/nuttx/fs/fat/fs_fat32util.c @@ -303,11 +303,12 @@ static int fat_checkbootrecord(struct fat_mountpt_s *fs) /* Verify the FAT32 file system type. The determination of the file * system type is based on the number of clusters on the volume: FAT12 - * volume has < 4085 cluseter, a FAT16 volume has fewer than 65,525 - * clusters, and any larger is FAT32. + * volume has <= FAT_MAXCLUST12 (4084) clusters, a FAT16 volume has <= + * FAT_MINCLUST16 (microsfoft says < 65,525) clusters, and any larger + * is FAT32. * * Get the number of 32-bit directory entries in root directory (zero - * for FAT32. + * for FAT32). */ fs->fs_rootentcnt = MBR_GETROOTENTCNT(fs->fs_buffer); @@ -382,12 +383,12 @@ static int fat_checkbootrecord(struct fat_mountpt_s *fs) /* Finally, the test: */ - if (fs->fs_nclusters < 4085) + if (fs->fs_nclusters <= FAT_MAXCLUST12) { fs->fs_fsinfo = 0; fs->fs_type = FSTYPE_FAT12; } - else if (fs->fs_nclusters < 65525) + else if (fs->fs_nclusters <= FAT_MAXCLUST16) { fs->fs_fsinfo = 0; fs->fs_type = FSTYPE_FAT16; |