Lines Matching refs:path
63 char* path = GetOneCfgFile(BATTERY_CONFIG_PATH, buf, MAX_PATH_LEN);
64 if (path == nullptr || *path == '\0') {
66 path = const_cast<char*>(BATTERY_CONFIG_EXCEPTION_PATH);
84 if (!OpenFile(ifsConf, path)) {
91 if (!OpenFile(ifsConf, path)) {
177 Json::Value currentPath = GetValue(chargerConfig, "current_limit.path");
182 Json::Value voltagePath = GetValue(chargerConfig, "voltage_limit.path");
187 Json::Value chargeTypePath = GetValue(chargerConfig, "type.path");
275 Json::Value supportPath = GetValue(valueObj, "support.path");
276 Json::Value setPath = GetValue(valueObj, "set.path");
277 Json::Value getPath = GetValue(valueObj, "get.path");
279 BATTERY_HILOGW(COMP_HDI, "The charge scene config path is invalid, key=%{public}s", key.c_str());
288 Json::Value supportPath = GetValue(valueObj, "support.path");
292 std::string path = supportPath.asString();
293 if (IsValidSysPath(path)) {
294 config.supportPath = path;
305 Json::Value setPath = GetValue(valueObj, "set.path");
307 std::string path = setPath.asString();
308 if (IsValidSysPath(path)) {
309 config.setPath = path;
318 Json::Value getPath = GetValue(valueObj, "get.path");
320 std::string path = getPath.asString();
321 if (IsValidSysPath(path)) {
322 config.getPath = path;
329 bool BatteryConfig::IsValidSysPath(const std::string& path)
332 if ((realpath(path.c_str(), resolvedPath) == nullptr) ||