diff options
| author | angryproton <[email protected]> | 2026-07-16 00:11:18 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2026-07-20 10:18:14 +0800 |
| commit | 560fa880ff7996a0aa4d377c3ac211176089fca8 (patch) | |
| tree | c4a2ba8986720305e39e5c9339dc15a4a3647840 /components | |
| parent | b6cdae57d4e93c31d9ed7c6751ca5ffcdd46493c (diff) | |
[fix][tmpfs]修正 getdents 中文件类型错误的判断变量
Diffstat (limited to 'components')
| -rw-r--r-- | components/dfs/dfs_v1/filesystems/tmpfs/dfs_tmpfs.c | 4 | ||||
| -rw-r--r-- | components/dfs/dfs_v2/filesystems/tmpfs/dfs_tmpfs.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/components/dfs/dfs_v1/filesystems/tmpfs/dfs_tmpfs.c b/components/dfs/dfs_v1/filesystems/tmpfs/dfs_tmpfs.c index cb971ef30c..223d121999 100644 --- a/components/dfs/dfs_v1/filesystems/tmpfs/dfs_tmpfs.c +++ b/components/dfs/dfs_v1/filesystems/tmpfs/dfs_tmpfs.c @@ -607,11 +607,11 @@ int dfs_tmpfs_getdents(struct dfs_file *file, if (index >= (rt_size_t)file->pos) { d = dirp + count; - if (d_file->type == TMPFS_TYPE_FILE) + if (n_file->type == TMPFS_TYPE_FILE) { d->d_type = DT_REG; } - if (d_file->type == TMPFS_TYPE_DIR) + if (n_file->type == TMPFS_TYPE_DIR) { d->d_type = DT_DIR; } diff --git a/components/dfs/dfs_v2/filesystems/tmpfs/dfs_tmpfs.c b/components/dfs/dfs_v2/filesystems/tmpfs/dfs_tmpfs.c index 1dc1fd54f9..996c01df78 100644 --- a/components/dfs/dfs_v2/filesystems/tmpfs/dfs_tmpfs.c +++ b/components/dfs/dfs_v2/filesystems/tmpfs/dfs_tmpfs.c @@ -525,11 +525,11 @@ static int dfs_tmpfs_getdents(struct dfs_file *file, if (index >= (rt_size_t)file->fpos) { d = dirp + count; - if (d_file->type == TMPFS_TYPE_FILE) + if (n_file->type == TMPFS_TYPE_FILE) { d->d_type = DT_REG; } - if (d_file->type == TMPFS_TYPE_DIR) + if (n_file->type == TMPFS_TYPE_DIR) { d->d_type = DT_DIR; } |
