mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-08-18 02:58:57 +08:00
[fix][tmpfs]修正 getdents 中文件类型错误的判断变量
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user