Lines Matching refs:console
543 bool readPstoreConsole(std::string& console) { in readPstoreConsole() argument
544 if (android::base::ReadFileToString("/sys/fs/pstore/console-ramoops-0", &console)) { in readPstoreConsole()
547 return android::base::ReadFileToString("/sys/fs/pstore/console-ramoops", &console); in readPstoreConsole()
555 const std::string& console; member in __anone79d00d20111::pstoreConsole
572 const char* l = console.c_str() + pos; in numError()
594 explicit pstoreConsole(const std::string& console) : console(console) {} in pstoreConsole() argument
596 explicit pstoreConsole(const std::string&& console) = delete;
597 explicit pstoreConsole(std::string&& console) = delete;
601 size_t pos = console.rfind(needle); // exact match? in rfind()
605 pos = console.length(); in rfind()
620 if (needle.length() > console.length()) return std::string::npos; in find()
621 const size_t last_pos = console.length() - needle.length(); in find()
629 operator const std::string&() const { return console; } in operator const std::string&()
637 const pstoreConsole console(reason); in correctForBitError() local
640 pos = console.find(needle, pos); in correctForBitError()
803 bool addKernelPanicSubReason(const pstoreConsole& console, std::string& ret) { in addKernelPanicSubReason() argument
805 if ((console.rfind("SysRq : Trigger a crash") != std::string::npos) || in addKernelPanicSubReason()
806 (console.rfind("PC is at sysrq_handle_crash+") != std::string::npos)) { in addKernelPanicSubReason()
811 auto pos = console.rfind(sysrqSubreason); in addKernelPanicSubReason()
813 ret += "," + getSubreason(console, pos + strlen(sysrqSubreason), /* quoted */ true); in addKernelPanicSubReason()
817 if (console.rfind("Unable to handle kernel NULL pointer dereference at virtual address") != in addKernelPanicSubReason()
822 if (console.rfind("Kernel BUG at ") != std::string::npos) { in addKernelPanicSubReason()
828 auto pos = console.rfind(panic); in addKernelPanicSubReason()
856 if (console.find(panic + s.first, pos) != std::string::npos) { in addKernelPanicSubReason()
861 auto reason = getSubreason(console, pos + panic.length(), /* newline */ false); in addKernelPanicSubReason()
1021 const pstoreConsole console(content); in BootReasonStrToReason() local
1024 if (console.rfind("reboot: Power down") != std::string::npos) { in BootReasonStrToReason()
1033 size_t pos = console.rfind(cmd); in BootReasonStrToReason()
1052 if (!addKernelPanicSubReason(console, ret) && in BootReasonStrToReason()
1054 ((console.rfind("Power held for ") != std::string::npos) || in BootReasonStrToReason()
1055 (console.rfind("charger: [") != std::string::npos))) { in BootReasonStrToReason()