net/procfs: Support chdir("/proc/net/") correctly

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I47295019c6054c869545e33258ad3460896e851a
This commit is contained in:
Xiang Xiao 2020-07-31 02:50:17 +08:00 committed by Abdelatif Guettouche
parent 2a2dd35339
commit 2d7f58d165

View File

@ -660,7 +660,7 @@ static int netprocfs_stat(FAR const char *relpath, FAR struct stat *buf)
{
/* Check for the directory "net" */
if (strcmp(relpath, "net") == 0)
if (strcmp(relpath, "net") == 0 || strcmp(relpath, "net/") == 0)
{
buf->st_mode = S_IFDIR | S_IROTH | S_IRGRP | S_IRUSR;
}