提交 82d4e498 编写于 作者: qiuyiuestc's avatar qiuyiuestc

fix dfs_stat issue

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@882 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 d41f2f08
......@@ -729,8 +729,6 @@ int nfs_stat(struct dfs_filesystem* fs, const char *path, struct _stat *st)
RT_ASSERT(fs->data != RT_NULL);
nfs = (struct nfs_filesystem *)fs->data;
rt_kprintf("get path:%s stat\n", path);
handle = get_handle(nfs, path);
if(handle == RT_NULL)
return -1;
......
......@@ -354,7 +354,11 @@ int dfs_file_stat(const char *path, struct _stat *buf)
return -DFS_STATUS_ENOSYS;
}
result = fs->ops->stat(fs, fullpath, buf);
if (dfs_subdir(fs->path, fullpath) == RT_NULL)
result = fs->ops->stat(fs, "/", buf);
else
result = fs->ops->stat(fs, dfs_subdir(fs->path, fullpath), buf);
rt_free(fullpath);
return result;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册