Lines Matching refs:file_contents
91 std::string file_contents; in ReadFileToInt() local
93 if (!ReadFileToString(path, &file_contents)) { in ReadFileToInt()
96 } else if (StartsWith(file_contents, "0x")) { in ReadFileToInt()
97 if (sscanf(file_contents.c_str(), "0x%x", val) != 1) { in ReadFileToInt()
101 } else if (sscanf(file_contents.c_str(), "%d", val) != 1) { in ReadFileToInt()
114 std::string file_contents; in logBatteryChargeCycles() local
120 if (!ReadFileToString(kCycleCountBinsPath, &file_contents)) { in logBatteryChargeCycles()
128 std::stringstream stream(file_contents); in logBatteryChargeCycles()
143 std::replace(file_contents.begin(), file_contents.end(), ' ', ','); in logBatteryChargeCycles()
163 std::string file_contents; in logCodecFailed() local
168 if (!ReadFileToString(kCodecPath, &file_contents)) { in logCodecFailed()
172 if (file_contents == "0") { in logCodecFailed()
187 std::string file_contents; in logCodec1Failed() local
192 if (!ReadFileToString(kCodec1Path, &file_contents)) { in logCodec1Failed()
196 if (file_contents == "0") { in logCodec1Failed()
211 std::string file_contents; in reportSlowIoFromFile() local
216 if (!ReadFileToString(path, &file_contents)) { in reportSlowIoFromFile()
221 if (sscanf(file_contents.c_str(), "%d", &slow_io_count) != 1) { in reportSlowIoFromFile()
222 ALOGE("Unable to parse %s from file %s to int.", file_contents.c_str(), path); in reportSlowIoFromFile()
250 std::string file_contents; in logSpeakerImpedance() local
255 if (!ReadFileToString(kImpedancePath, &file_contents)) { in logSpeakerImpedance()
261 if (sscanf(file_contents.c_str(), "%g,%g", &left, &right) != 2) { in logSpeakerImpedance()
262 ALOGE("Unable to parse speaker impedance %s", file_contents.c_str()); in logSpeakerImpedance()
281 std::string file_contents; in logSpeakerHealthStats() local
305 if (!ReadFileToString(kImpedancePath, &file_contents)) { in logSpeakerHealthStats()
309 if (sscanf(file_contents.c_str(), "%g,%g", &left_impedance_ohm, &right_impedance_ohm) != 2) { in logSpeakerHealthStats()
310 ALOGE("Unable to parse speaker impedance %s", file_contents.c_str()); in logSpeakerHealthStats()
315 if (!ReadFileToString(kSpeakerTemperaturePath, &file_contents)) { in logSpeakerHealthStats()
319 if (sscanf(file_contents.c_str(), "%g,%g", &left_temperature_C, &right_temperature_C) != 2) { in logSpeakerHealthStats()
320 ALOGE("Unable to parse speaker temperature %s", file_contents.c_str()); in logSpeakerHealthStats()
325 if (!ReadFileToString(kSpeakerExcursionPath, &file_contents)) { in logSpeakerHealthStats()
329 if (sscanf(file_contents.c_str(), "%g,%g", &left_excursion_mm, &right_excursion_mm) != 2) { in logSpeakerHealthStats()
330 ALOGE("Unable to parse speaker excursion %s", file_contents.c_str()); in logSpeakerHealthStats()
335 if (!ReadFileToString(kSpeakerHeartbeatPath, &file_contents)) { in logSpeakerHealthStats()
339 if (sscanf(file_contents.c_str(), "%g,%g", &left_heartbeat, &right_heartbeat) != 2) { in logSpeakerHealthStats()
340 ALOGE("Unable to parse speaker heartbeat %s", file_contents.c_str()); in logSpeakerHealthStats()
366 std::string file_contents; in logSpeechDspStat() local
371 if (!ReadFileToString(kSpeechDspPath, &file_contents)) { in logSpeechDspStat()
377 if (sscanf(file_contents.c_str(), "%d,%d,%d,%d", &up_time, &down_time, &crash_count, in logSpeechDspStat()
379 ALOGE("Unable to parse speech dsp stat %s", file_contents.c_str()); in logSpeechDspStat()
395 std::string file_contents; in logBatteryCapacity() local
427 std::string file_contents; in logUFSLifetime() local
718 std::string file_contents; in reportZramMmStat() local
724 if (!ReadFileToString(kZramMmStatPath, &file_contents)) { in reportZramMmStat()
740 if (sscanf(file_contents.c_str(), in reportZramMmStat()
746 file_contents.c_str(), kZramMmStatPath); in reportZramMmStat()
784 std::string file_contents; in reportZramBdStat() local
790 if (!ReadFileToString(kZramBdStatPath, &file_contents)) { in reportZramBdStat()
798 if (sscanf(file_contents.c_str(), "%" SCNd64 " %" SCNd64 " %" SCNd64, in reportZramBdStat()
801 file_contents.c_str(), kZramBdStatPath); in reportZramBdStat()