This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 31325ba2e97 Documentation/nsh: Describe the mount options and the mode 
of cp.
31325ba2e97 is described below

commit 31325ba2e97120dfa1d4c46885649d1d48066285
Author: Marco Casaroli <[email protected]>
AuthorDate: Sun Oct 18 00:19:57 2026 +0200

    Documentation/nsh: Describe the mount options and the mode of cp.
    
    NSH mount now passes the generic -o options as mount flags, and cp keeps
    the execute bits of the source file.
    
    Describe both in the NSH command page.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 Documentation/applications/nsh/commands.rst | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/Documentation/applications/nsh/commands.rst 
b/Documentation/applications/nsh/commands.rst
index c1e79508a89..f77f8659f6d 100644
--- a/Documentation/applications/nsh/commands.rst
+++ b/Documentation/applications/nsh/commands.rst
@@ -330,7 +330,9 @@ indication only if the files differ.
 
 **Synopsis**. Copy of the contents of the file at
 ``<source-path>`` to the location in the file system indicated by
-``<dest-path>``.
+``<dest-path>``.  A new file gets the mode ``0666`` plus the execute bits
+of the source file, so a copied program stays executable.  An existing
+destination file keeps its mode.
 
 .. _cmddate:
 
@@ -1400,6 +1402,12 @@ way association, binding:
      may be needed to complete the full path but the full path must
      not already exist.
 
+The '-o ``<options>``' argument is a comma-separated list.  The generic
+options ``ro``, ``rw``, ``noexec``, ``exec``, ``nosuid``, ``suid``,
+``nodev``, ``dev``, ``sync``, ``async``, ``noatime`` and ``atime`` become
+mount flags (for example ``MS_RDONLY`` or ``MS_NOEXEC``).  The other options
+go to the file system, for example ``trans=virtio,tag=system`` for v9fs.
+
 After the volume has been mounted in the NuttX
 :ref:`pseudo file system <file_system_overview>`, it may be
 access in the same way as other objects in the file system.

Reply via email to