diff options
| author | Bernard Xiong <[email protected]> | 2015-01-27 15:32:58 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2015-01-27 15:32:58 +0800 |
| commit | aaacd40425212ad2fab9bf31138f2e3a004b73e4 (patch) | |
| tree | 7f028b113046e654cc7d275946c06a0f19b05e33 | |
| parent | 19ee2c7e0923379bc022caed8561340b18135d88 (diff) | |
| parent | eb898f69c97a91a7ac7c813602e1dd560e677911 (diff) | |
Merge pull request #419 from AubrCool/fix-dfs.fd_is_openError
Correct dfs fd_is_open search index error
| -rw-r--r-- | components/dfs/src/dfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/components/dfs/src/dfs.c b/components/dfs/src/dfs.c index 4e38615ba7..7e56137aba 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) |
