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:31:05 UTC
(nuttx) branch master updated (325ff9321b2 -> b780600c5ae)
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 325ff9321b2 libs/libc/machine/arm64: Keep ADRP when the erratum 843419 ADR cannot reach.
new 078b6c73e70 fs/fat: Report execute permission for files and directories.
new b780600c5ae Documentation/nsh: Show the execute bits of FAT files in the examples.
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:
Documentation/applications/nsh/commands.rst | 24 ++++++++++++------------
fs/fat/fs_fat32.c | 13 +++++++------
2 files changed, 19 insertions(+), 18 deletions(-)
(nuttx) 01/02: fs/fat: Report execute permission for files and 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 078b6c73e70d0f360d7f0b5cf64dafc70ada716b
Author: Marco Casaroli <ma...@gmail.com>
AuthorDate: Sat Oct 17 23:57:54 2026 +0200
fs/fat: Report execute permission for files and directories.
FAT has no execute permission. fat_stat() and fat_fstat() reported
r--r--r-- or rw-rw-rw- for every file and directory, also for the root
directory. So a program on a FAT volume had no execute bit, and no
directory had the search bit.
Report the execute bit for all files and directories, in the same way
as the read bit. Other systems mount FAT with these bits by default.
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <ma...@gmail.com>
---
fs/fat/fs_fat32.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/fs/fat/fs_fat32.c b/fs/fat/fs_fat32.c
index b18c9f7da9a..d5199d5b5a0 100644
--- a/fs/fat/fs_fat32.c
+++ b/fs/fat/fs_fat32.c
@@ -2624,7 +2624,8 @@ static int fat_fstat(FAR const struct file *filep, FAR struct stat *buf)
memset(buf, 0, sizeof(struct stat));
- buf->st_mode = S_IROTH | S_IRGRP | S_IRUSR | S_IFREG;
+ buf->st_mode = S_IROTH | S_IRGRP | S_IRUSR | S_IXOTH | S_IXGRP |
+ S_IXUSR | S_IFREG;
if ((fstatshared->s_attr & FATATTR_READONLY) == 0)
{
buf->st_mode |= S_IWOTH | S_IWGRP | S_IWUSR;
@@ -3900,11 +3901,12 @@ static int fat_stat_file(FAR struct fat_mountpt_s *fs,
return -ENOENT;
}
- /* Set the access permissions. The file/directory is always readable
- * by everyone but may be writeable by no-one.
+ /* Set the access permissions. FAT has no execute permission. The
+ * file/directory is always readable and executable by everyone, as on
+ * other systems, but may be writeable by no-one.
*/
- buf->st_mode = S_IROTH | S_IRGRP | S_IRUSR;
+ buf->st_mode = S_IROTH | S_IRGRP | S_IRUSR | S_IXOTH | S_IXGRP | S_IXUSR;
if ((attribute & FATATTR_READONLY) == 0)
{
buf->st_mode |= S_IWOTH | S_IWGRP | S_IWUSR;
@@ -3940,8 +3942,7 @@ static int fat_stat_root(FAR struct fat_mountpt_s *fs, FAR struct stat *buf)
/* It's directory name of the mount point */
- buf->st_mode = S_IFDIR | S_IROTH | S_IRGRP | S_IRUSR | S_IWOTH |
- S_IWGRP | S_IWUSR;
+ buf->st_mode = S_IFDIR | S_IRWXO | S_IRWXG | S_IRWXU;
return OK;
}
(nuttx) 02/02: Documentation/nsh: Show the execute bits of FAT files in the examples.
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 b780600c5aeb026bae0d9c2de71476243eb81550
Author: Marco Casaroli <ma...@gmail.com>
AuthorDate: Sun Oct 18 00:08:09 2026 +0200
Documentation/nsh: Show the execute bits of FAT files in the examples.
FAT now reports execute permission for files and directories, so the
"ls -l" examples of FAT volumes in the NSH command page show rwx.
Update the examples. Devices do not change.
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <ma...@gmail.com>
---
Documentation/applications/nsh/commands.rst | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/Documentation/applications/nsh/commands.rst b/Documentation/applications/nsh/commands.rst
index f77f8659f6d..5c0a44f4916 100644
--- a/Documentation/applications/nsh/commands.rst
+++ b/Documentation/applications/nsh/commands.rst
@@ -394,7 +394,7 @@ create a new file of the specified size filled with zero::
nsh> dd if=/dev/zero of=/tmp/zeros bs=64 count=16
nsh> ls -l /tmp
/tmp:
- -rw-rw-rw- 1024 ZEROS
+ -rwxrwxrwx 1024 ZEROS
Read from character device, write to block device. This will fill
the entire block device with zeros::
@@ -1046,7 +1046,7 @@ on the loop-mounted file::
nsh> dd if=/dev/zero of=/tmp/image bs=512 count=512
nsh> ls -l /tmp
/tmp:
- -rw-rw-rw- 262144 IMAGE
+ -rwxrwxrwx 262144 IMAGE
nsh> losetup /dev/loop0 /tmp/image
nsh> ls -l /dev
/dev:
@@ -1056,11 +1056,11 @@ on the loop-mounted file::
nsh> ls -l /mnt
ls -l /mnt
/mnt:
- drw-rw-rw- 0 example/
+ drwxrwxrwx 0 example/
nsh> echo "This is a test" >/mnt/example/atest.txt
nsh> ls -l /mnt/example
/mnt/example:
- -rw-rw-rw- 16 ATEST.TXT
+ -rwxrwxrwx 16 ATEST.TXT
nsh> cat /mnt/example/atest.txt
This is a test
nsh>
@@ -1249,8 +1249,8 @@ directories in the *pseudo* file system.
nsh> mkdir /mnt/fs/tmp
nsh> ls -l /mnt/fs
/mnt/fs:
- drw-rw-rw- 0 TESTDIR/
- drw-rw-rw- 0 TMP/
+ drwxrwxrwx 0 TESTDIR/
+ drwxrwxrwx 0 TMP/
nsh>
.. _cmdmkfatfs:
@@ -1426,12 +1426,12 @@ Using ``mount`` to mount a file system::
nsh> mount -t vfat /dev/ram0 /mnt/fs
nsh> ls -l /mnt/fs/testdir
/mnt/fs/testdir:
- -rw-rw-rw- 15 TESTFILE.TXT
+ -rwxrwxrwx 15 TESTFILE.TXT
nsh> echo "This is a test" >/mnt/fs/testdir/example.txt
nsh> ls -l /mnt/fs/testdir
/mnt/fs/testdir:
- -rw-rw-rw- 15 TESTFILE.TXT
- -rw-rw-rw- 16 EXAMPLE.TXT
+ -rwxrwxrwx 15 TESTFILE.TXT
+ -rwxrwxrwx 16 EXAMPLE.TXT
nsh> cat /mnt/fs/testdir/example.txt
This is a test
nsh>
@@ -1644,12 +1644,12 @@ file system.
nsh> mkdir /mnt/fs/tmp
nsh> ls -l /mnt/fs
/mnt/fs:
- drw-rw-rw- 0 TESTDIR/
- drw-rw-rw- 0 TMP/
+ drwxrwxrwx 0 TESTDIR/
+ drwxrwxrwx 0 TMP/
nsh> rmdir /mnt/fs/tmp
nsh> ls -l /mnt/fs
/mnt/fs:
- drw-rw-rw- 0 TESTDIR/
+ drwxrwxrwx 0 TESTDIR/
nsh>
.. _cmdrmmod: