Lines Matching refs:filename
49 int32_t readFile(const std::string &filename, std::string *contents) { in readFile() argument
55 fp = fopen(filename.c_str(), "r"); in readFile()
117 std::string filename = in switchToDrp() local
121 if (filename != "") { in switchToDrp()
122 fp = fopen(filename.c_str(), "w"); in switchToDrp()
138 std::string filename = in switchMode() local
144 if (filename == "") { in switchMode()
149 fp = fopen(filename.c_str(), "w"); in switchMode()
218 std::string filename = in switchRole() local
224 if (filename == "") { in switchRole()
231 ALOGI("filename write: %s role:%s", filename.c_str(), in switchRole()
237 fp = fopen(filename.c_str(), "w"); in switchRole()
241 if ((ret != EOF) && !readFile(filename, &written)) { in switchRole()
274 std::string filename = in getAccessoryConnected() local
277 if (readFile(filename, accessory)) { in getAccessoryConnected()
279 filename.c_str()); in getAccessoryConnected()
288 std::string filename; in getCurrentRoleHelper() local
295 filename = "/sys/class/typec/" + portName + "/power_role"; in getCurrentRoleHelper()
298 filename = "/sys/class/typec/" + portName + "/data_role"; in getCurrentRoleHelper()
301 filename = "/sys/class/typec/" + portName + "/data_role"; in getCurrentRoleHelper()
322 if (readFile(filename, &roleName)) { in getCurrentRoleHelper()
324 filename.c_str()); in getCurrentRoleHelper()
383 std::string filename = in canSwitchRoleHelper() local
387 if (!readFile(filename, &supportsPD)) { in canSwitchRoleHelper()