Lines Matching refs:path
62 bool SysfsCollector::ReadFileToInt(const std::string &path, int *val) { in ReadFileToInt() argument
63 return ReadFileToInt(path.c_str(), val); in ReadFileToInt()
66 bool SysfsCollector::ReadFileToInt(const char *const path, int *val) { in ReadFileToInt() argument
69 if (!ReadFileToString(path, &file_contents)) { in ReadFileToInt()
70 ALOGE("Unable to read %s - %s", path, strerror(errno)); in ReadFileToInt()
73 ALOGE("Unable to convert %s to int - %s", path, strerror(errno)); in ReadFileToInt()
155 void SysfsCollector::reportSlowIoFromFile(const char *path, in reportSlowIoFromFile() argument
158 if (path == nullptr || strlen(path) == 0) { in reportSlowIoFromFile()
162 if (!ReadFileToString(path, &file_contents)) { in reportSlowIoFromFile()
163 ALOGE("Unable to read slowio %s - %s", path, strerror(errno)); in reportSlowIoFromFile()
168 ALOGE("Unable to parse %s from file %s to int.", file_contents.c_str(), path); in reportSlowIoFromFile()
174 if (!android::base::WriteStringToFile("0", path, true)) { in reportSlowIoFromFile()
175 ALOGE("Unable to clear SlowIO entry %s - %s", path, strerror(errno)); in reportSlowIoFromFile()