vfs: stat_recursive should return -ENOSYS if stat callback is NULL

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic342b6fff112d24c7355ddc8aa0937dfc544f1b4
This commit is contained in:
Xiang Xiao 2021-07-12 11:28:50 +08:00 committed by Gustavo Henrique Nihei
parent d539998446
commit 30135b5f18

View File

@ -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