You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/08/03 20:00:30 UTC
[incubator-nuttx] branch master updated (2a2dd35 -> 0e610ca)
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.
from 2a2dd35 arch/sim: Fix warning: implicit declaration of function ‘pthread_yield’
new 2d7f58d net/procfs: Support chdir("/proc/net/") correctly
new 1bad139 fs/romfs: Support the path with tail '/' correctly
new 0e610ca fs/procfs: Handle /proc/xxx/group/ correctly
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
fs/procfs/fs_procfsproc.c | 7 ++++++-
fs/romfs/fs_romfsutil.c | 5 +++++
net/procfs/net_procfs.c | 2 +-
3 files changed, 12 insertions(+), 2 deletions(-)
[incubator-nuttx] 01/03: net/procfs: Support chdir("/proc/net/")
correctly
Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 2d7f58d1659168d196ea90cc92f30d7e27e7a92d
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Jul 31 02:50:17 2020 +0800
net/procfs: Support chdir("/proc/net/") correctly
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
Change-Id: I47295019c6054c869545e33258ad3460896e851a
---
net/procfs/net_procfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/procfs/net_procfs.c b/net/procfs/net_procfs.c
index b3481fc..64aa3ad 100644
--- a/net/procfs/net_procfs.c
+++ b/net/procfs/net_procfs.c
@@ -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;
}
[incubator-nuttx] 02/03: fs/romfs: Support the path with tail '/'
correctly
Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 1bad139f88d18b8e26d2b77abe5c8735f866799f
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Jul 31 02:51:05 2020 +0800
fs/romfs: Support the path with tail '/' correctly
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
Change-Id: I7ea668e50e68cb384d013349a2c8cfc2844f3b73
---
fs/romfs/fs_romfsutil.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/romfs/fs_romfsutil.c b/fs/romfs/fs_romfsutil.c
index bb6123d..92b24b7 100644
--- a/fs/romfs/fs_romfsutil.c
+++ b/fs/romfs/fs_romfsutil.c
@@ -751,6 +751,11 @@ int romfs_finddirentry(struct romfs_mountpt_s *rm,
entrylen = terminator - entryname;
}
+ if (entrylen == 0)
+ {
+ return OK;
+ }
+
/* Long path segment names will be truncated to NAME_MAX */
if (entrylen > NAME_MAX)
[incubator-nuttx] 03/03: fs/procfs: Handle /proc/xxx/group/
correctly
Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 0e610caec857808124c13f65b142f45ff4d79b0b
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Jul 31 02:51:58 2020 +0800
fs/procfs: Handle /proc/xxx/group/ correctly
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
Change-Id: Ic9f4c38a3baf199712c5497c094dc7af84deee2c
---
fs/procfs/fs_procfsproc.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/fs/procfs/fs_procfsproc.c b/fs/procfs/fs_procfsproc.c
index 26a549b..0584a9e 100644
--- a/fs/procfs/fs_procfsproc.c
+++ b/fs/procfs/fs_procfsproc.c
@@ -406,7 +406,12 @@ static FAR const struct proc_node_s *proc_findnode(FAR const char *relpath)
for (i = 0; i < PROC_NNODES; i++)
{
- if (strcmp(g_nodeinfo[i]->relpath, relpath) == 0)
+ size_t len = strlen(g_nodeinfo[i]->relpath);
+
+ if (strncmp(g_nodeinfo[i]->relpath, relpath, len) == 0 &&
+ (relpath[len] == '\0' || (relpath[len] == '/' &&
+ relpath[len + 1] == '\0' &&
+ g_nodeinfo[i]->dtype == DTYPE_DIRECTORY)))
{
return g_nodeinfo[i];
}