From eb898f69c97a91a7ac7c813602e1dd560e677911 Mon Sep 17 00:00:00 2001 From: "Aubr.Cool" Date: Tue, 27 Jan 2015 10:58:26 +0800 Subject: [PATCH] Correct dfs fd_is_open search index error --- components/dfs/src/dfs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/dfs/src/dfs.c b/components/dfs/src/dfs.c index 4e38615ba..7e56137ab 100644 --- a/components/dfs/src/dfs.c +++ b/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) -- GitLab