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-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new d14111ebe system/nxinit: map the power-off soft reset reason
d14111ebe is described below

commit d14111ebeff7e8eb0512e63238883dece6842c05
Author: wangjianyu3 <[email protected]>
AuthorDate: Wed Nov 4 10:37:12 2026 +0800

    system/nxinit: map the power-off soft reset reason
    
    Adapt resetflag[] to the BOARDIOC_SOFTRESETCAUSE_POWEROFF and _MAX
    subreasons added by apache/nuttx#21386: map POWEROFF to "shutdown",
    and MAX to "unknown" for out-of-range subreasons.
    
    Assisted-by: OpenCode:claude-opus-4.8 OpenCode:mimo-v2.6-pro
    Signed-off-by: wangjianyu3 <[email protected]>
---
 system/nxinit/init.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/system/nxinit/init.c b/system/nxinit/init.c
index 6f4f4747d..19ce5447f 100644
--- a/system/nxinit/init.c
+++ b/system/nxinit/init.c
@@ -155,6 +155,8 @@ static int init_boot_reason(FAR struct action_manager_s *am)
       [BOARDIOC_SOFTRESETCAUSE_RESTORE_FACTORY_INQUIRY] =
         "factory_reset_inquiry",
       [BOARDIOC_SOFTRESETCAUSE_THERMAL]                 = "thermal",
+      [BOARDIOC_SOFTRESETCAUSE_POWEROFF]                = "shutdown",
+      [BOARDIOC_SOFTRESETCAUSE_MAX]                     = "unknown",
     };
 
   char buf[CONFIG_SYSTEM_NXINIT_RC_LINE_MAX];

Reply via email to