Merge pull request #2263 from RT-Thread/fix_fdopen
[DFS] Remove opened file check
This commit is contained in:
commit
71da3392fc
|
@ -8,6 +8,7 @@
|
||||||
* 2005-02-22 Bernard The first version.
|
* 2005-02-22 Bernard The first version.
|
||||||
* 2011-12-08 Bernard Merges rename patch from iamcacy.
|
* 2011-12-08 Bernard Merges rename patch from iamcacy.
|
||||||
* 2015-05-27 Bernard Fix the fd clear issue.
|
* 2015-05-27 Bernard Fix the fd clear issue.
|
||||||
|
* 2019-01-24 Bernard Remove file repeatedly open check.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <dfs.h>
|
#include <dfs.h>
|
||||||
|
@ -48,14 +49,6 @@ int dfs_file_open(struct dfs_fd *fd, const char *path, int flags)
|
||||||
|
|
||||||
LOG_D("open file:%s", fullpath);
|
LOG_D("open file:%s", fullpath);
|
||||||
|
|
||||||
/* Check whether file is already open */
|
|
||||||
if (fd_is_open(fullpath) == 0)
|
|
||||||
{
|
|
||||||
rt_free(fullpath); /* release path */
|
|
||||||
|
|
||||||
return -EBUSY;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* find filesystem */
|
/* find filesystem */
|
||||||
fs = dfs_filesystem_lookup(fullpath);
|
fs = dfs_filesystem_lookup(fullpath);
|
||||||
if (fs == NULL)
|
if (fs == NULL)
|
||||||
|
|
Loading…
Reference in New Issue