OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60091ce
)
printk: silence healthd and batteryd logs
author
Julian Liu
<wlootlxt123@gmail.com>
Tue, 1 Oct 2019 23:41:11 +0000
(07:41 +0800)
committer
0ranko0P
<ranko0p@outlook.com>
Tue, 24 Dec 2019 20:42:21 +0000
(
04:42
+0800)
* <3>batteryd, <4>healthd
kernel/printk/printk.c
patch
|
blob
|
history
diff --git
a/kernel/printk/printk.c
b/kernel/printk/printk.c
index
fd63b4d
..
56b2415
100644
(file)
--- a/
kernel/printk/printk.c
+++ b/
kernel/printk/printk.c
@@
-648,6
+648,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;
@@
-660,9
+664,11
@@
static ssize_t devkmsg_write(struct kiocb *iocb, struct iov_iter *from)
len -= endp - line;
line = endp;
}
+ }
}
printk_emit(facility, level, NULL, 0, "%s", line);
+ignore:
kfree(buf);
return ret;
}