Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8ed36b6 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

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
parent 93d344d9
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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.
+2 −2
Original line number Diff line number Diff line
@@ -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);