Skip to content

Commit 571447b

Browse files
nmaggionixiaoxiang781216
authored andcommitted
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 <[email protected]>
1 parent 4c73660 commit 571447b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sched/misc/coredump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ static void coredump_dump_syslog(pid_t pid)
686686
FAR const char *streamname;
687687
int logmask;
688688

689-
logmask = setlogmask(LOG_ALERT);
689+
logmask = setlogmask(LOG_UPTO(LOG_ALERT));
690690

691691
_alert("Start coredump:\n");
692692

0 commit comments

Comments
 (0)