From e2d6088507e74a5097e88e19fc631e22b2879fbc Mon Sep 17 00:00:00 2001 From: angryproton Date: Thu, 16 Jul 2026 00:11:18 +0800 Subject: [PATCH] =?UTF-8?q?[fix][tmpfs]=E4=BF=AE=E6=AD=A3=20getdents=20?= =?UTF-8?q?=E4=B8=AD=E6=96=87=E4=BB=B6=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E5=88=A4=E6=96=AD=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/dfs/dfs_v1/filesystems/tmpfs/dfs_tmpfs.c | 4 ++-- 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 cb971ef30c3..223d1219991 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 1dc1fd54f9e..996c01df782 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; }