vfs/dirread: Should return the same file type as lstat

by extend the possible value of d_type for the special file

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2020-07-06 00:34:32 +08:00
committed by Abdelatif Guettouche
parent 91ed14c631
commit 67ef70d460
6 changed files with 118 additions and 37 deletions
+5
View File
@@ -943,6 +943,11 @@ static int romfs_readdir(FAR struct inode *mountpt,
dir->fd_dir.d_type = DTYPE_FILE;
break;
}
else if (IS_SOFTLINK(next))
{
dir->fd_dir.d_type = DTYPE_LINK;
break;
}
}
errout_with_semaphore: