procfs: procfs_opendir should return fail if can't match

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2022-06-21 20:16:29 +08:00 committed by Xiang Xiao
parent 3bc2131918
commit 1f854486c3
1 changed files with 5 additions and 0 deletions

View File

@ -664,6 +664,11 @@ static int procfs_opendir(FAR struct inode *mountpt, FAR const char *relpath,
break;
}
}
if (x == g_procfs_entrycount)
{
return -ENOENT;
}
}
dir->u.procfs = priv;