Skip to content

Commit

Permalink
vfs: stat_recursive should return -ENOSYS if stat callback is NULL
Browse files Browse the repository at this point in the history
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic342b6fff112d24c7355ddc8aa0937dfc544f1b4
  • Loading branch information
xiaoxiang781216 authored and gustavonihei committed Jul 13, 2021
1 parent d539998 commit 30135b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/vfs/fs_stat.c
Expand Up @@ -120,6 +120,10 @@ static int stat_recursive(FAR const char *path,

ret = inode->u.i_mops->stat(inode, desc.relpath, buf);
}
else
{
ret = -ENOSYS;
}
}
else
#endif
Expand Down

0 comments on commit 30135b5

Please sign in to comment.