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

xiaoxiang 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 571447bb06c coredump: Fix missing loglevel to logmask conversion.
571447bb06c is described below

commit 571447bb06caa3938d64ac05646ff715fc1109f6
Author: Niccolò Maggioni <nicco.maggi...@gmail.com>
AuthorDate: Tue Jul 8 00:14:01 2025 +0200

    coredump: Fix missing loglevel to logmask conversion.
    
    The current setlogmask call used in coredump_dump_syslog specifies a raw 
log level
    instead of a bitmask, and this causes wrong evaluations later on when that 
value
    is checked against a mask. Therefore the LOG_UPTO macro is added for 
conversion.
    
    Signed-off-by: Niccolò Maggioni <nicco.maggioni+nu...@gmail.com>
---
 sched/misc/coredump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sched/misc/coredump.c b/sched/misc/coredump.c
index fc5a83e1ff7..e66e0462c90 100644
--- a/sched/misc/coredump.c
+++ b/sched/misc/coredump.c
@@ -686,7 +686,7 @@ static void coredump_dump_syslog(pid_t pid)
   FAR const char *streamname;
   int logmask;
 
-  logmask = setlogmask(LOG_ALERT);
+  logmask = setlogmask(LOG_UPTO(LOG_ALERT));
 
   _alert("Start coredump:\n");
 

Reply via email to