mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-27 17:45:13 +08:00
[DFS] Fix the ramfs issue.
This commit is contained in:
@@ -311,12 +311,13 @@ int dfs_ramfs_getdents(struct dfs_fd *file,
|
||||
struct dfs_ramfs *ramfs;
|
||||
|
||||
dirent = (struct ramfs_dirent *)file->data;
|
||||
if (dirent != &(ramfs->root))
|
||||
return -EINVAL;
|
||||
|
||||
ramfs = dirent->fs;
|
||||
RT_ASSERT(ramfs != RT_NULL);
|
||||
|
||||
if (dirent != &(ramfs->root))
|
||||
return -EINVAL;
|
||||
|
||||
/* make integer count */
|
||||
count = (count / sizeof(struct dirent));
|
||||
if (count == 0)
|
||||
|
||||
Reference in New Issue
Block a user