浏览代码

Merge pull request #419 from AubrCool/fix-dfs.fd_is_openError

Correct dfs fd_is_open search index error
Bernard Xiong 10 年之前
父节点
当前提交
aaacd40425
共有 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);
 
         dfs_lock();
+#ifdef DFS_USING_STDIO
+        for (index = 3; index < DFS_FD_MAX+3; index++)
+#else
         for (index = 0; index < DFS_FD_MAX; index++)
+#endif
         {
             fd = &(fd_table[index]);
             if (fd->fs == RT_NULL)