diff options
| author | bernard.xiong <[email protected]> | 2009-11-09 00:11:30 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2009-11-09 00:11:30 +0000 |
| commit | 42e2844616a42aa57d2da3964c44f98c6df1bc85 (patch) | |
| tree | d6b039c92cd86d8dc63cda4199337a97b78bcd66 /filesystem/dfs/src | |
| parent | 774c4d961a3ef5a041aafd417b42ec35123bea0d (diff) | |
fix the closedir issue, which does not release fd. add static ioman support in EFSL.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@158 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'filesystem/dfs/src')
| -rw-r--r-- | filesystem/dfs/src/dfs_posix.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/filesystem/dfs/src/dfs_posix.c b/filesystem/dfs/src/dfs_posix.c index 2c965b0257..9a903cf790 100644 --- a/filesystem/dfs/src/dfs_posix.c +++ b/filesystem/dfs/src/dfs_posix.c @@ -344,6 +344,7 @@ DIR* opendir(const char* name) /* allocate a fd */
fd = fd_new();
+ if (fd == -1) { rt_kprintf("no fd\n"); return RT_NULL; }
d = fd_get(fd);
result = dfile_raw_open(d, name, DFS_O_RDONLY | DFS_O_DIRECTORY);
@@ -490,10 +491,10 @@ int closedir(DIR* d) struct dfs_fd* fd;
fd = fd_get(d->fd);
-
result = dfile_raw_close(fd);
fd_put(fd);
+ fd_put(fd);
rt_free(d);
if (result < 0)
|
