Lines Matching refs:reason

633 bool correctForBitError(std::string& reason, const std::string& needle) {  in correctForBitError()  argument
635 if (reason.length() < needle.length()) return corrected; in correctForBitError()
636 const pstoreConsole console(reason); in correctForBitError()
637 const size_t last_pos = reason.length() - needle.length(); in correctForBitError()
643 if (needle == reason.substr(pos, needle.length())) continue; in correctForBitError()
646 reason = reason.substr(0, pos) + needle + reason.substr(pos + needle.length()); in correctForBitError()
654 bool correctForBitErrorOrUnderline(std::string& reason, const std::string& needle) { in correctForBitErrorOrUnderline() argument
655 bool corrected = correctForBitError(reason, needle); in correctForBitErrorOrUnderline()
660 corrected |= correctForBitError(reason, _needle); in correctForBitErrorOrUnderline()
667 void transformReason(std::string& reason) { in transformReason() argument
668 std::transform(reason.begin(), reason.end(), reason.begin(), ::tolower); in transformReason()
669 std::transform(reason.begin(), reason.end(), reason.begin(), in transformReason()
671 std::transform(reason.begin(), reason.end(), reason.begin(), in transformReason()
860 auto reason = getSubreason(console, pos + panic.length(), /* newline */ false); in addKernelPanicSubReason() local
861 if (reason.length() > 3) { in addKernelPanicSubReason()
862 ret += "," + reason; in addKernelPanicSubReason()
926 std::string reason(boot_reason); in BootReasonStrToReason() local
928 if (reason == ret) ret = ""; in BootReasonStrToReason()
930 transformReason(reason); in BootReasonStrToReason()
937 std::vector<std::string> words(android::base::Split(reason, ",_-")); in BootReasonStrToReason()
990 if (!firstHasNot && (reason.find(s.first) != std::string::npos)) { in BootReasonStrToReason()
994 if (s.second.size() && std::regex_search(reason, std::regex(s.second))) { in BootReasonStrToReason()
1003 if (reason.find("sec") != std::string::npos) { in BootReasonStrToReason()
1085 if (android::base::StartsWith(reason, "reboot")) { in BootReasonStrToReason()
1086 reason = reason.substr(strlen("reboot")); in BootReasonStrToReason()
1087 while ((reason[0] == ',') || (reason[0] == '_')) { in BootReasonStrToReason()
1088 reason = reason.substr(1); in BootReasonStrToReason()
1091 if (reason != "") { in BootReasonStrToReason()
1093 ret += reason; in BootReasonStrToReason()
1226 auto reason = android::base::GetProperty(bootloader_reboot_reason_property, "<EMPTY>"); in LogBootInfoToStatsd() local
1228 android::util::stats_write(android::util::BOOT_SEQUENCE_REPORTED, reason.c_str(), in LogBootInfoToStatsd()
1350 const auto reason = android::base::GetProperty(bootloader_reboot_reason_property, ""); in RecordBootReason() local
1352 if (reason.empty()) { in RecordBootReason()
1367 int32_t boot_reason = BootReasonStrToEnum(reason); in RecordBootReason()
1376 if (reason == "") { in RecordBootReason()