Skip to content

Commit 0c680bc

Browse files
nmaggionijerpelea
authored andcommitted
system/coredump: Fix missing loglevel to logmask conversion.
The current setlogmask call used in the coredump app 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>
1 parent 0037868 commit 0c680bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/coredump/coredump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ static int coredump_now(int pid, FAR char *filename)
418418
#endif
419419

420420
printf("Start coredump:\n");
421-
logmask = setlogmask(LOG_ALERT);
421+
logmask = setlogmask(LOG_UPTO(LOG_ALERT));
422422

423423
/* Initialize hex output stream */
424424

0 commit comments

Comments
 (0)