Kernel: Colorize log message for capabilities that have not been pledged

The log message can be hard to spot in a sea of debug messages. Colorize
it to make the message more immediately pop out.
This commit is contained in:
Timothy Flynn 2024-04-26 08:34:34 -04:00 committed by Tim Flynn
parent 4d9b6645d7
commit ab602cfc2c

View file

@ -1172,7 +1172,7 @@ ErrorOr<void> Process::require_promise(Pledge promise)
if (has_promised(promise))
return {};
dbgln("Has not pledged {}", to_string(promise));
dbgln("\033[31;1mProcess has not pledged '{}'\033[0m", to_string(promise));
Thread::current()->set_promise_violation_pending(true);
(void)try_set_coredump_property("pledge_violation"sv, to_string(promise));
return EPROMISEVIOLATION;