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 d1a4694dbbc Documentation/nxinit: Describe comment lines in init.rc.
d1a4694dbbc is described below

commit d1a4694dbbc488583ed9d8624f7d8bf03a913dac
Author: Marco Casaroli <[email protected]>
AuthorDate: Wed Oct 21 00:39:51 2026 +0200

    Documentation/nxinit: Describe comment lines in init.rc.
    
    NXInit now skips a line whose first character that is not whitespace
    is "#".  Say so.  Say also that only a board init.rc in RCSRCS goes
    through the C preprocessor, where a "#" line is a preprocessor
    directive: NXInit itself does not preprocess the file that it reads at
    run time.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 Documentation/applications/system/nxinit/index.rst | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Documentation/applications/system/nxinit/index.rst 
b/Documentation/applications/system/nxinit/index.rst
index 053e5a55d07..463e70bd3c4 100644
--- a/Documentation/applications/system/nxinit/index.rst
+++ b/Documentation/applications/system/nxinit/index.rst
@@ -19,8 +19,11 @@ It is lightweight, supports command execution triggered by 
events, supports
 service/daemon management and many more.
 
 The ``init.rc`` consists of five categories of statements, all line-oriented 
with
-parameters separated by spaces. The content is processed by a preprocessor,
-following C language specifications for escape rules and comment formats.
+parameters separated by spaces. A line whose first character that is not
+whitespace is ``#`` is a comment. A board ``init.rc`` in ``RCSRCS`` goes
+through the C preprocessor when the board ROMFS image is built: there it can
+use ``#include``, ``#ifdef`` and C comments, and a line that starts with ``#``
+is a preprocessor directive.
 
 File path configured by ``CONFIG_SYSTEM_NXINIT_RC_FILE_PATH``.
 

Reply via email to