printk: silence healthd and batteryd logs

* <3>batteryd, <4>healthd
This commit is contained in:
wloot 2021-01-04 17:30:15 +02:00 committed by spakkkk
parent cdc44de3ca
commit d8672064ab

View File

@ -820,6 +820,10 @@ static ssize_t devkmsg_write(struct kiocb *iocb, struct iov_iter *from)
*/
line = buf;
if (line[0] == '<') {
if (memcmp(line+3, "batteryd", sizeof("batteryd")-1) == 0 ||
memcmp(line+3, "healthd", sizeof("healthd")-1) == 0)
goto ignore;
{
char *endp = NULL;
unsigned int u;
@ -833,8 +837,10 @@ static ssize_t devkmsg_write(struct kiocb *iocb, struct iov_iter *from)
line = endp;
}
}
}
printk_emit(facility, level, NULL, 0, "%s", line);
ignore:
kfree(buf);
return ret;
}