소스 검색

Correct dfs fd_is_open search index error

Aubr.Cool 11 년 전
부모
커밋
eb898f69c9
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      components/dfs/src/dfs.c

+ 4 - 0
components/dfs/src/dfs.c

@@ -234,7 +234,11 @@ int fd_is_open(const char *pathname)
             mountpath = fullpath + strlen(fs->path);
             mountpath = fullpath + strlen(fs->path);
 
 
         dfs_lock();
         dfs_lock();
+#ifdef DFS_USING_STDIO
+        for (index = 3; index < DFS_FD_MAX+3; index++)
+#else
         for (index = 0; index < DFS_FD_MAX; index++)
         for (index = 0; index < DFS_FD_MAX; index++)
+#endif
         {
         {
             fd = &(fd_table[index]);
             fd = &(fd_table[index]);
             if (fd->fs == RT_NULL)
             if (fd->fs == RT_NULL)