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
commit 2a75a98e9157c69b07edef37fd05bc59cfe173fe Author: xuxingliang <[email protected]> AuthorDate: Fri Feb 27 23:06:48 2026 +0800 syslog: set default channel to disabled state when PANIC_ONLY enabled The commit "syslog: switch default channel disable from compile-time to runtime" removed the compile-time static disable of g_default_channel sc_state, expecting DFX to handle it at runtime via SYSLOGIOC_SETFILTER. However, before DFX initializes, the channel remains enabled (sc_state = 0), violating the PANIC_ONLY semantic that the default channel should only output during panic. Restore the initial SYSLOG_CHANNEL_DISABLE in g_default_channel when CONFIG_SYSLOG_DEFAULT_PANIC_ONLY is enabled, using the proper bitmask instead of the previous bare `true`. Assisted-by: Kiro:claude-opus-5-5 Assisted-by: Claude Signed-off-by: xuxingliang <[email protected]> --- drivers/syslog/syslog_channel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/syslog/syslog_channel.c b/drivers/syslog/syslog_channel.c index aefea0b0dc4..c2a00d17928 100644 --- a/drivers/syslog/syslog_channel.c +++ b/drivers/syslog/syslog_channel.c @@ -189,6 +189,9 @@ static syslog_channel_t g_default_channel = # ifdef CONFIG_SYSLOG_IOCTL , "default" # endif +# ifdef CONFIG_SYSLOG_DEFAULT_PANIC_ONLY + , SYSLOG_CHANNEL_DISABLE +# endif # ifdef CONFIG_SYSLOG_CONSOLE_LEVEL , .sc_dropmask = SYSLOG_CONSOLE_DROPMASK # endif
