提交 3101ba8a 编写于 作者: B bernard

[DFS] Add fd checking in dfs_file_close API.

上级 8ee0bf89
......@@ -136,6 +136,9 @@ int dfs_file_close(struct dfs_fd *fd)
{
int result = 0;
if (fd == RT_NULL)
return -DFS_STATUS_ENXIO;
if (fd != RT_NULL && fd->fs->ops->close != RT_NULL)
result = fd->fs->ops->close(fd);
......@@ -568,6 +571,7 @@ void rm(const char *filename)
}
}
FINSH_FUNCTION_EXPORT(rm, remove files or directories);
void cat(const char* filename)
{
rt_uint32_t length;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册