Loading bootstat/bootstat.cpp +2 −19 Original line number Diff line number Diff line Loading @@ -926,27 +926,10 @@ std::string BootReasonStrToReason(const std::string& boot_reason) { } android_logcat_pclose(&ctx, fp); static const char logcat_battery[] = "W/healthd ( 0): battery l="; const char* match = logcat_battery; if (content == "") { // Service logd.klog not running, go to smaller buffer in the kernel. int rc = klogctl(KLOG_SIZE_BUFFER, nullptr, 0); if (rc > 0) { ssize_t len = rc + 1024; // 1K Margin should it grow between calls. std::unique_ptr<char[]> buf(new char[len]); rc = klogctl(KLOG_READ_ALL, buf.get(), len); if (rc < len) { len = rc + 1; } buf[--len] = '\0'; content = buf.get(); } match = battery; } pos = content.find(match); // The first one it finds. pos = content.find(logcat_battery); // The first one it finds. if (pos != std::string::npos) { digits = content.substr(pos + strlen(match), strlen("100 ")); digits = content.substr(pos + strlen(logcat_battery), strlen("100 ")); } endptr = digits.c_str(); level = 0; Loading libcutils/fs_config.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -180,8 +180,6 @@ static const struct fs_path_config android_files[] = { // in user builds. { 00700, AID_SYSTEM, AID_SHELL, CAP_MASK_LONG(CAP_BLOCK_SUSPEND), "system/bin/inputflinger" }, { 00550, AID_SYSTEM, AID_LOG, CAP_MASK_LONG(CAP_SYSLOG), "system/bin/bootstat" }, { 00750, AID_ROOT, AID_SHELL, CAP_MASK_LONG(CAP_SETUID) | CAP_MASK_LONG(CAP_SETGID), "system/bin/run-as" }, Loading Loading
bootstat/bootstat.cpp +2 −19 Original line number Diff line number Diff line Loading @@ -926,27 +926,10 @@ std::string BootReasonStrToReason(const std::string& boot_reason) { } android_logcat_pclose(&ctx, fp); static const char logcat_battery[] = "W/healthd ( 0): battery l="; const char* match = logcat_battery; if (content == "") { // Service logd.klog not running, go to smaller buffer in the kernel. int rc = klogctl(KLOG_SIZE_BUFFER, nullptr, 0); if (rc > 0) { ssize_t len = rc + 1024; // 1K Margin should it grow between calls. std::unique_ptr<char[]> buf(new char[len]); rc = klogctl(KLOG_READ_ALL, buf.get(), len); if (rc < len) { len = rc + 1; } buf[--len] = '\0'; content = buf.get(); } match = battery; } pos = content.find(match); // The first one it finds. pos = content.find(logcat_battery); // The first one it finds. if (pos != std::string::npos) { digits = content.substr(pos + strlen(match), strlen("100 ")); digits = content.substr(pos + strlen(logcat_battery), strlen("100 ")); } endptr = digits.c_str(); level = 0; Loading
libcutils/fs_config.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -180,8 +180,6 @@ static const struct fs_path_config android_files[] = { // in user builds. { 00700, AID_SYSTEM, AID_SHELL, CAP_MASK_LONG(CAP_BLOCK_SUSPEND), "system/bin/inputflinger" }, { 00550, AID_SYSTEM, AID_LOG, CAP_MASK_LONG(CAP_SYSLOG), "system/bin/bootstat" }, { 00750, AID_ROOT, AID_SHELL, CAP_MASK_LONG(CAP_SETUID) | CAP_MASK_LONG(CAP_SETGID), "system/bin/run-as" }, Loading