You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2026/10/18 11:43:03 UTC
(nuttx) branch master updated (4fd68e523da -> c8dd4f252fa)
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
from 4fd68e523da fs/zipfs: Report execute permission for files and the root.
new 697fb4e212b fs/procfs: Fix the nxstyle error in fs_procfs.c.
new c8dd4f252fa fs/procfs: Report the search permission for directories.
The 2 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_procfs.c | 7 +++++--
fs/procfs/fs_procfspressure.c | 3 ++-
fs/procfs/fs_procfsproc.c | 6 ++++--
fs/procfs/fs_skeleton.c | 3 ++-
4 files changed, 13 insertions(+), 6 deletions(-)
(nuttx) 02/02: fs/procfs: Report the search permission for directories.
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit c8dd4f252fa59027882a293fba2cdcc0c5c68194
Author: Marco Casaroli <ma...@gmail.com>
AuthorDate: Sat Oct 17 23:57:57 2026 +0200
fs/procfs: Report the search permission for directories.
The procfs directories were reported as r--r--r--. On a directory the
execute bit is the search permission, so the directories looked as if
nobody could look up a name in them.
Report the procfs directories as r-xr-xr-x. Files do not change.
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <ma...@gmail.com>
---
fs/procfs/fs_procfs.c | 6 ++++--
fs/procfs/fs_procfspressure.c | 3 ++-
fs/procfs/fs_procfsproc.c | 6 ++++--
fs/procfs/fs_skeleton.c | 3 ++-
4 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/fs/procfs/fs_procfs.c b/fs/procfs/fs_procfs.c
index b680b1152d7..f1092f04c8a 100644
--- a/fs/procfs/fs_procfs.c
+++ b/fs/procfs/fs_procfs.c
@@ -1147,7 +1147,8 @@ static int procfs_stat(FAR struct inode *mountpt, FAR const char *relpath,
* It's a read-only directory.
*/
- buf->st_mode = S_IFDIR | S_IROTH | S_IRGRP | S_IRUSR;
+ buf->st_mode = S_IFDIR | S_IROTH | S_IRGRP | S_IRUSR |
+ S_IXOTH | S_IXGRP | S_IXUSR;
ret = OK;
}
else
@@ -1179,7 +1180,8 @@ static int procfs_stat(FAR struct inode *mountpt, FAR const char *relpath,
{
/* It's an internal subdirectory */
- buf->st_mode = S_IFDIR | S_IROTH | S_IRGRP | S_IRUSR;
+ buf->st_mode = S_IFDIR | S_IROTH | S_IRGRP | S_IRUSR |
+ S_IXOTH | S_IXGRP | S_IXUSR;
ret = OK;
break;
}
diff --git a/fs/procfs/fs_procfspressure.c b/fs/procfs/fs_procfspressure.c
index 97f8767baaa..525c98915df 100644
--- a/fs/procfs/fs_procfspressure.c
+++ b/fs/procfs/fs_procfspressure.c
@@ -394,7 +394,8 @@ static int pressure_stat(const char *relpath, struct stat *buf)
if (strcmp(relpath, "pressure") == 0 || strcmp(relpath, "pressure/") == 0)
{
- buf->st_mode = S_IFDIR | S_IROTH | S_IRGRP | S_IRUSR;
+ buf->st_mode = S_IFDIR | S_IROTH | S_IRGRP | S_IRUSR |
+ S_IXOTH | S_IXGRP | S_IXUSR;
}
else if (strcmp(relpath, "pressure/memory") == 0)
{
diff --git a/fs/procfs/fs_procfsproc.c b/fs/procfs/fs_procfsproc.c
index e5e83f1933c..15008cf74c8 100644
--- a/fs/procfs/fs_procfsproc.c
+++ b/fs/procfs/fs_procfsproc.c
@@ -2200,7 +2200,8 @@ static int proc_stat(const char *relpath, struct stat *buf)
{
/* Yes ... It's a read-only directory */
- buf->st_mode = S_IFDIR | S_IROTH | S_IRGRP | S_IRUSR;
+ buf->st_mode = S_IFDIR | S_IROTH | S_IRGRP | S_IRUSR |
+ S_IXOTH | S_IXGRP | S_IXUSR;
}
/* Verify that the process ID is followed by valid path segment delimiter */
@@ -2241,7 +2242,8 @@ static int proc_stat(const char *relpath, struct stat *buf)
}
else
{
- buf->st_mode = S_IFDIR | S_IROTH | S_IRGRP | S_IRUSR;
+ buf->st_mode = S_IFDIR | S_IROTH | S_IRGRP | S_IRUSR |
+ S_IXOTH | S_IXGRP | S_IXUSR;
}
}
diff --git a/fs/procfs/fs_skeleton.c b/fs/procfs/fs_skeleton.c
index a760e13eea0..0eb9c22424e 100644
--- a/fs/procfs/fs_skeleton.c
+++ b/fs/procfs/fs_skeleton.c
@@ -484,7 +484,8 @@ static int skel_stat(FAR const char *relpath, FAR struct stat *buf)
*/
memset(buf, 0, sizeof(struct stat));
- buf->st_mode = S_IFDIR | S_IROTH | S_IRGRP | S_IRUSR;
+ buf->st_mode = S_IFDIR | S_IROTH | S_IRGRP | S_IRUSR |
+ S_IXOTH | S_IXGRP | S_IXUSR;
/* TODO: Set S_IFREG if the relpath refers to a file.
* TODO: If the skel_write() method is supported, then stat must also
(nuttx) 01/02: fs/procfs: Fix the nxstyle error in fs_procfs.c.
Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 697fb4e212bc77f9b59f859c8506ebf439c2540a
Author: Marco Casaroli <ma...@gmail.com>
AuthorDate: Sat Oct 17 23:57:28 2026 +0200
fs/procfs: Fix the nxstyle error in fs_procfs.c.
nxstyle reports "Missing blank line after declarations" in
procfs_stat().
Add the blank line. This commit changes only whitespace.
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <ma...@gmail.com>
---
fs/procfs/fs_procfs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/procfs/fs_procfs.c b/fs/procfs/fs_procfs.c
index f4cba0c2bb3..b680b1152d7 100644
--- a/fs/procfs/fs_procfs.c
+++ b/fs/procfs/fs_procfs.c
@@ -949,6 +949,7 @@ static int procfs_readdir(FAR struct inode *mountpt,
pid_t pid = level0->pid[index];
FAR struct tcb_s *tcb = nxsched_get_tcb(pid);
+
if (!tcb)
{
ferr("ERROR: PID %d is no longer valid\n", pid);