diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-11-19 20:30:39 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-11-19 20:30:39 +0000 |
commit | fa09debae62c900129855fe03932ab0ceef2d0b0 (patch) | |
tree | 6b21b337cfd6e6cd8baeeb33a375a7c9226bf696 /nuttx/fs/fat/fs_fat32.c | |
parent | 3d7a7cab5a53586684ea034062e200d33951fef0 (diff) | |
download | px4-nuttx-fa09debae62c900129855fe03932ab0ceef2d0b0.tar.gz px4-nuttx-fa09debae62c900129855fe03932ab0ceef2d0b0.tar.bz2 px4-nuttx-fa09debae62c900129855fe03932ab0ceef2d0b0.zip |
Revised FAT bugfix
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4104 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/fs/fat/fs_fat32.c')
-rw-r--r-- | nuttx/fs/fat/fs_fat32.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nuttx/fs/fat/fs_fat32.c b/nuttx/fs/fat/fs_fat32.c index b0ee57a18..22c285c40 100644 --- a/nuttx/fs/fat/fs_fat32.c +++ b/nuttx/fs/fat/fs_fat32.c @@ -1494,7 +1494,7 @@ static int fat_rewinddir(struct inode *mountpt, struct fs_dirent_s *dir) } /* Check if this is the root directory. If it is the root directory, we - * reset the fd_index to 1, skipping over the initial, unused entry. + * reset the fd_index to 0, starting with the initial, entry. */ if (fs->fs_type != FSTYPE_FAT32 && @@ -1504,7 +1504,7 @@ static int fat_rewinddir(struct inode *mountpt, struct fs_dirent_s *dir) dir->u.fat.fd_currcluster = 0; dir->u.fat.fd_currsector = fs->fs_rootbase; - dir->u.fat.fd_index = 1; + dir->u.fat.fd_index = 0; } else if (fs->fs_type == FSTYPE_FAT32 && dir->u.fat.fd_startcluster == fs->fs_rootbase) @@ -1513,7 +1513,7 @@ static int fat_rewinddir(struct inode *mountpt, struct fs_dirent_s *dir) dir->u.fat.fd_currcluster = dir->u.fat.fd_startcluster; dir->u.fat.fd_currsector = fat_cluster2sector(fs, fs->fs_rootbase); - dir->u.fat.fd_index = 1; + dir->u.fat.fd_index = 0; } /* This is not the root directory. Here the fd_index is set to 2, skipping over |