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 <wahidzk0091@gmail.com>
Signed-off-by: atndko <z1281552865@gmail.com>
Signed-off-by: Vaisakh Murali <mvaisakh@statixos.com>
Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
This commit is contained in:
atndko 2023-07-16 15:27:36 +00:00 committed by Ksawlii
parent 0b24a687cf
commit 3a5f3cae8a

View file

@ -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;