Use ro.logd.kernel for kernel logcat

Prevent a possible DOS of the kernel logs because the runtime result
could differ from the boottime result.

Test: adb bugreport, then examine kernel log
Change-Id: I140fd465f2e691c751d92af50dbdf95e23c121d8
This commit is contained in:
Siarhei Vishniakou 2017-12-28 14:13:22 -08:00
parent 93d344d98c
commit e8ed36b6b3
2 changed files with 5 additions and 5 deletions

View file

@ -31,9 +31,9 @@ ro.logd.size number svelte default for persist.logd.size. Larger
resist increasing the log buffer.
persist.logd.size.<buffer> number ro Size of the buffer for <buffer> log
ro.logd.size.<buffer> number svelte default for persist.logd.size.<buffer>
ro.config.low_ram bool false if true, logd.statistics, logd.kernel
default false, logd.size 64K instead
of 256K.
ro.config.low_ram bool false if true, logd.statistics,
ro.logd.kernel default false,
logd.size 64K instead of 256K.
persist.logd.filter string Pruning filter to optimize content.
At runtime use: logcat -P "<string>"
ro.logd.filter string "~! ~1000/!" default for persist.logd.filter.

View file

@ -438,8 +438,8 @@ int main(int argc, char* argv[]) {
int fdPmesg = -1;
bool klogd = __android_logger_property_get_bool(
"logd.kernel", BOOL_DEFAULT_TRUE | BOOL_DEFAULT_FLAG_PERSIST |
BOOL_DEFAULT_FLAG_ENG | BOOL_DEFAULT_FLAG_SVELTE);
"ro.logd.kernel",
BOOL_DEFAULT_TRUE | BOOL_DEFAULT_FLAG_ENG | BOOL_DEFAULT_FLAG_SVELTE);
if (klogd) {
static const char proc_kmsg[] = "/proc/kmsg";
fdPmesg = android_get_control_file(proc_kmsg);