inode_stat: handle INODE_IS_PSEUDODIR case

If you open() a directory and fstat() it, you come here.
This commit fixes the file type in that case.
This commit is contained in:
YAMAMOTO Takashi 2022-10-19 19:11:56 +09:00 committed by Xiang Xiao
parent c48feac0e9
commit aa67e0a0f4
1 changed files with 2 additions and 2 deletions

View File

@ -381,9 +381,9 @@ int inode_stat(FAR struct inode *inode, FAR struct stat *buf, int resolve)
/* Determine the type of the inode */
/* Check for a mountpoint */
/* Check for a mountpoint and a pseudo dir */
if (INODE_IS_MOUNTPT(inode))
if (INODE_IS_MOUNTPT(inode) || INODE_IS_PSEUDODIR(inode))
{
buf->st_mode |= S_IFDIR;
}