net/procfs: Support chdir("/proc/net/") correctly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: I47295019c6054c869545e33258ad3460896e851a
This commit is contained in:
parent
2a2dd35339
commit
2d7f58d165
@ -660,7 +660,7 @@ static int netprocfs_stat(FAR const char *relpath, FAR struct stat *buf)
|
|||||||
{
|
{
|
||||||
/* Check for the directory "net" */
|
/* 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;
|
buf->st_mode = S_IFDIR | S_IROTH | S_IRGRP | S_IRUSR;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user