From 3a5f3cae8ab349eb00bcfad4bef6a1a6fb59b408 Mon Sep 17 00:00:00 2001 From: atndko Date: Sun, 16 Jul 2023 15:27:36 +0000 Subject: [PATCH] printk: Silence useless system log spam When charging, healthd and dashd will spam every several secs, it's sooooo noisy and useless. If you launch a userspace app, there will give a logd message, silence it. Signed-off-by: Wahid Khan Signed-off-by: atndko Signed-off-by: Vaisakh Murali Signed-off-by: Cyber Knight --- kernel/printk/printk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 0a14037a8..b1af51a0e 100755 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -820,6 +820,12 @@ static ssize_t devkmsg_write(struct kiocb *iocb, struct iov_iter *from) } } + if ((strstr(line, "healthd")) || (strstr(line, "logd")) || + strstr(line, "dashd")) { + kfree(buf); + return len; + } + devkmsg_emit(facility, level, "%s", line); kfree(buf); return ret;