Skip to content

Commit aaacd40

Browse files
committed
Merge pull request #419 from AubrCool/fix-dfs.fd_is_openError
Correct dfs fd_is_open search index error
2 parents 19ee2c7 + eb898f6 commit aaacd40

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

components/dfs/src/dfs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,11 @@ int fd_is_open(const char *pathname)
234234
mountpath = fullpath + strlen(fs->path);
235235

236236
dfs_lock();
237+
#ifdef DFS_USING_STDIO
238+
for (index = 3; index < DFS_FD_MAX+3; index++)
239+
#else
237240
for (index = 0; index < DFS_FD_MAX; index++)
241+
#endif
238242
{
239243
fd = &(fd_table[index]);
240244
if (fd->fs == RT_NULL)

0 commit comments

Comments
 (0)