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+nuttx@gmail.com>
This commit is contained in:
Niccolò Maggioni 2025-07-08 00:14:01 +02:00 committed by Xiang Xiao
parent 4c7366045c
commit 571447bb06

View file

@ -686,7 +686,7 @@ static void coredump_dump_syslog(pid_t pid)
FAR const char *streamname; FAR const char *streamname;
int logmask; int logmask;
logmask = setlogmask(LOG_ALERT); logmask = setlogmask(LOG_UPTO(LOG_ALERT));
_alert("Start coredump:\n"); _alert("Start coredump:\n");