From 195d885887cc00b4f1a65ee7b5f62d45b5e62be6 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 20 Jan 2022 00:18:46 -0800 Subject: [PATCH] Reduce log spamming --- native/jni/init/getinfo.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/native/jni/init/getinfo.cpp b/native/jni/init/getinfo.cpp index 8d2591805..2a07d39af 100644 --- a/native/jni/init/getinfo.cpp +++ b/native/jni/init/getinfo.cpp @@ -204,7 +204,6 @@ if (access(file_name, R_OK) == 0) { \ string data = full_read(file_name); \ if (!data.empty()) { \ data.pop_back(); \ - LOGD(name "=[%s]\n", data.data()); \ strlcpy(config->key, data.data(), sizeof(config->key)); \ } \ } @@ -223,12 +222,7 @@ void load_kernel_info(BootConfig *config) { setup_klog(); config->set(parse_cmdline(full_read("/proc/cmdline"))); - LOGD("Kernel cmdline info:\n"); - config->print(); - config->set(parse_bootconfig(full_read("/proc/bootconfig"))); - LOGD("Boot config info:\n"); - config->print(); parse_prop_file("/.backup/.magisk", [=](auto key, auto value) -> bool { if (key == "RECOVERYMODE" && value == "true") { @@ -242,11 +236,13 @@ void load_kernel_info(BootConfig *config) { if (config->dt_dir[0] == '\0') strlcpy(config->dt_dir, DEFAULT_DT_DIR, sizeof(config->dt_dir)); - LOGD("Device tree:\n"); char file_name[128]; read_dt("fstab_suffix", fstab_suffix) read_dt("hardware", hardware) read_dt("hardware.platform", hardware_plat) + + LOGD("Device config:\n"); + config->print(); } bool check_two_stage() {