/hardware/qcom/sdm845/thermal/ |
D | thermal.c | 46 char *line = NULL; in get_num_cpus() local 59 if ((read = getline(&line, &len, file)) != -1) { in get_num_cpus() 60 if (strnlen(line, read) < 3 || strncmp(line, "0-", 2) != 0 || !isdigit(line[2])) in get_num_cpus() 63 cpus = atoi(&line[2]) + 1; in get_num_cpus() 65 free(line); in get_num_cpus() 84 char *line = NULL; in get_cpu_usages() local 105 while ((read = getline(&line, &len, file)) != -1) { in get_cpu_usages() 106 if (strnlen(line, read) < 4 || strncmp(line, "cpu", 3) != 0 || !isdigit(line[3])) { in get_cpu_usages() 107 free(line); in get_cpu_usages() 108 line = NULL; in get_cpu_usages() [all …]
|
/hardware/ril/reference-ril/ |
D | atchannel.c | 121 static void addIntermediate(const char *line) in addIntermediate() argument 127 p_new->line = strdup(line); in addIntermediate() 150 static int isFinalResponseError(const char *line) in isFinalResponseError() argument 155 if (strStartsWith(line, s_finalResponsesError[i])) { in isFinalResponseError() 172 static int isFinalResponseSuccess(const char *line) in isFinalResponseSuccess() argument 177 if (strStartsWith(line, s_finalResponsesSuccess[i])) { in isFinalResponseSuccess() 190 static int isFinalResponse(const char *line) in isFinalResponse() argument 192 return isFinalResponseSuccess(line) || isFinalResponseError(line); in isFinalResponse() 205 static int isSMSUnsolicited(const char *line) in isSMSUnsolicited() argument 210 if (strStartsWith(line, s_smsUnsoliciteds[i])) { in isSMSUnsolicited() [all …]
|
D | reference-ril.c | 288 static int callFromCLCCLine(char *line, RIL_Call *p_call) in callFromCLCCLine() argument 297 err = at_tok_start(&line); in callFromCLCCLine() 300 err = at_tok_nextint(&line, &(p_call->index)); in callFromCLCCLine() 303 err = at_tok_nextbool(&line, &(p_call->isMT)); in callFromCLCCLine() 306 err = at_tok_nextint(&line, &state); in callFromCLCCLine() 312 err = at_tok_nextint(&line, &mode); in callFromCLCCLine() 317 err = at_tok_nextbool(&line, &(p_call->isMpty)); in callFromCLCCLine() 320 if (at_tok_hasmore(&line)) { in callFromCLCCLine() 321 err = at_tok_nextstr(&line, &(p_call->number)); in callFromCLCCLine() 334 err = at_tok_nextint(&line, &p_call->toa); in callFromCLCCLine() [all …]
|
D | misc.c | 21 int strStartsWith(const char *line, const char *prefix) in strStartsWith() argument 23 for ( ; *line != '\0' && *prefix != '\0' ; line++, prefix++) { in strStartsWith() 24 if (*line != *prefix) { in strStartsWith()
|
/hardware/invensense/65xx/libsensors_iio/software/core/mllite/linux/ |
D | ml_sysfs_helper.c | 114 char line[4096], d; in parsing_proc_input() local 129 memset(line, 0, 100); in parsing_proc_input() 133 line[0] = 0; in parsing_proc_input() 136 sprintf(&line[i], "%c", d); in parsing_proc_input() 139 if(line[0] == 'N'){ in parsing_proc_input() 141 while(line[i] != '"'){ in parsing_proc_input() 149 if(!memcmp(&line[i], chip_name[j], strlen(chip_name[j]))){ in parsing_proc_input() 156 if(!memcmp(&line[i], name, strlen(name))){ in parsing_proc_input() 163 if(line[0] == 'S'){ in parsing_proc_input() 166 while(line[i] != '=') i++; in parsing_proc_input() [all …]
|
/hardware/invensense/6515/libsensors_iio/software/core/mllite/linux/ |
D | ml_sysfs_helper.c | 122 char line[4096], d; in parsing_proc_input() local 137 memset(line, 0, 100); in parsing_proc_input() 141 line[0] = 0; in parsing_proc_input() 144 sprintf(&line[i], "%c", d); in parsing_proc_input() 147 if(line[0] == 'N'){ in parsing_proc_input() 149 while(line[i] != '"'){ in parsing_proc_input() 157 if(!memcmp(&line[i], chip_name[j], strlen(chip_name[j]))){ in parsing_proc_input() 164 if(!memcmp(&line[i], name, strlen(name))){ in parsing_proc_input() 171 if(line[0] == 'S'){ in parsing_proc_input() 174 while(line[i] != '=') i++; in parsing_proc_input() [all …]
|
/hardware/google/pixel/powerstats/ |
D | GenericStateResidencyDataProvider.cpp | 64 FILE *fp, char *&line, size_t &len) { in parseState() argument 69 while ((numFieldsRead < numFields) && (getline(&line, &len, fp) != -1)) { in parseState() 72 if (config.entryCountSupported && utils::extractStat(line, config.entryCountPrefix, stat)) { in parseState() 77 utils::extractStat(line, config.totalTimePrefix, stat)) { in parseState() 82 utils::extractStat(line, config.lastEntryPrefix, stat)) { in parseState() 100 static auto findNext(const std::vector<T> &collection, FILE *fp, char *&line, size_t &len, in findNext() argument 107 while (getline(&line, &len, fp) != -1) { in findNext() 109 if (pred(*it, line)) { in findNext() 121 char *&line, size_t &len) { in getStateData() argument 136 stateResidencyConfigs, fp, line, len, pred)) != endState) { in getStateData() [all …]
|
D | WlanStateResidencyDataProvider.cpp | 63 char *line = nullptr; in getResults() local 65 while ((numFieldsRead < numFields) && (getline(&line, &len, fp.get()) != -1)) { in getResults() 67 if (utils::extractStat(line, "cumulative_sleep_time_ms:", stat)) { in getResults() 70 } else if (utils::extractStat(line, "cumulative_total_on_time_ms:", stat)) { in getResults() 73 } else if (utils::extractStat(line, "deep_sleep_enter_counter:", stat)) { in getResults() 77 } else if (utils::extractStat(line, "last_deep_sleep_enter_tstamp_ms:", stat)) { in getResults() 83 free(line); in getResults()
|
/hardware/qcom/display/msm8960/libmemtrack/ |
D | kgsl.c | 49 char line[1024]; in kgsl_memtrack_get_memory() local 65 if (fgets(line, sizeof(line), fp)) { in kgsl_memtrack_get_memory() 66 if (strcmp(line, "/system/bin/surfaceflinger") == 0) in kgsl_memtrack_get_memory() 92 if (fgets(line, sizeof(line), fp) == NULL) { in kgsl_memtrack_get_memory() 100 ret = sscanf(line, "%*x %*lx %lu %*d %6s %6s %18s %*d\n", in kgsl_memtrack_get_memory()
|
/hardware/qcom/display/msm8084/libmemtrack/ |
D | kgsl.c | 50 char line[1024]; in kgsl_memtrack_get_memory() local 67 if (fgets(line, sizeof(line), fp)) { in kgsl_memtrack_get_memory() 68 if (strcmp(line, "/system/bin/surfaceflinger") == 0) in kgsl_memtrack_get_memory() 94 if (fgets(line, sizeof(line), fp) == NULL) { in kgsl_memtrack_get_memory() 102 ret = sscanf(line, "%*x %*lx %lu %*d %6s %6s %18s %*d\n", in kgsl_memtrack_get_memory()
|
/hardware/qcom/display/msm8226/libmemtrack/ |
D | kgsl.c | 50 char line[1024]; in kgsl_memtrack_get_memory() local 67 if (fgets(line, sizeof(line), fp)) { in kgsl_memtrack_get_memory() 68 if (strcmp(line, "/system/bin/surfaceflinger") == 0) in kgsl_memtrack_get_memory() 94 if (fgets(line, sizeof(line), fp) == NULL) { in kgsl_memtrack_get_memory() 102 ret = sscanf(line, "%*x %*x %lu %*d %6s %6s %*s %*d\n", in kgsl_memtrack_get_memory()
|
/hardware/qcom/display/msm8994/libmemtrack/ |
D | kgsl.c | 50 char line[1024]; in kgsl_memtrack_get_memory() local 67 if (fgets(line, sizeof(line), fp)) { in kgsl_memtrack_get_memory() 68 if (strcmp(line, "/system/bin/surfaceflinger") == 0) in kgsl_memtrack_get_memory() 94 if (fgets(line, sizeof(line), fp) == NULL) { in kgsl_memtrack_get_memory() 102 ret = sscanf(line, "%*x %*lx %lu %*d %6s %6s %18s %*d %lu\n", in kgsl_memtrack_get_memory()
|
/hardware/qcom/display/msm8996/libmemtrack/ |
D | kgsl.c | 49 char line[1024]; in kgsl_memtrack_get_memory() local 65 if (fgets(line, sizeof(line), fp)) { in kgsl_memtrack_get_memory() 66 if (strcmp(line, "/system/bin/surfaceflinger") == 0) in kgsl_memtrack_get_memory() 92 if (fgets(line, sizeof(line), fp) == NULL) { in kgsl_memtrack_get_memory() 100 ret = sscanf(line, "%*x %*lx %lu %*d %8s %6s %18s %*d %lu\n", in kgsl_memtrack_get_memory()
|
/hardware/nxp/secure_element/libese-spi/p73/utils/ |
D | config.cpp | 95 string line; in parseFromString() local 96 while (getline(ss, line)) { in parseFromString() 97 line = Trim(line); in parseFromString() 98 if (line.empty()) continue; in parseFromString() 99 if (line.at(0) == '#') continue; in parseFromString() 100 if (line.at(0) == 0) continue; in parseFromString() 102 auto search = line.find('='); in parseFromString() 105 string key(Trim(line.substr(0, search))); in parseFromString() 106 string value_string(Trim(line.substr(search + 1, string::npos))); in parseFromString()
|
/hardware/libhardware/modules/thermal/ |
D | thermal.c | 90 char *line = NULL; in get_cpu_usages() local 102 while ((read = getline(&line, &len, file)) != -1) { in get_cpu_usages() 104 if (strnlen(line, read) < 4 || strncmp(line, "cpu", 3) != 0 || !isdigit(line[3])) { in get_cpu_usages() 105 free(line); in get_cpu_usages() 106 line = NULL; in get_cpu_usages() 110 vals = sscanf(line, "cpu%d %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64, &cpu_num, &user, in get_cpu_usages() 113 free(line); in get_cpu_usages() 114 line = NULL; in get_cpu_usages()
|
/hardware/qcom/sdm845/gps/msm8960/utils/ |
D | loc_target.cpp | 63 static int read_a_line(const char * file_path, char * line, int line_size) in read_a_line() argument 68 * line = '\0'; in read_a_line() 75 fgets(line, line_size, fp); in read_a_line() 76 len = strlen(line); in read_a_line() 78 line[len] = '\0'; in read_a_line() 79 LOC_LOGD("cat %s: %s", file_path, line); in read_a_line()
|
/hardware/qcom/gps/msm8960/utils/ |
D | loc_target.cpp | 63 static int read_a_line(const char * file_path, char * line, int line_size) in read_a_line() argument 68 * line = '\0'; in read_a_line() 75 fgets(line, line_size, fp); in read_a_line() 76 len = strlen(line); in read_a_line() 78 line[len] = '\0'; in read_a_line() 79 LOC_LOGD("cat %s: %s", file_path, line); in read_a_line()
|
/hardware/google/pixel/pixelstats/ |
D | UeventListener.cpp | 140 void UeventListener::ReportChargeStats(sp<IStats> &stats_client, const char *line) { in ReportChargeStats() argument 150 ALOGD("ChargeStats: processing %s", line); in ReportChargeStats() 151 if (sscanf(line, "%d,%d,%d, %d,%d,%d,%d", &tmp[0], &tmp[1], &tmp[2], &tmp[3], &tmp[4], &tmp[5], in ReportChargeStats() 153 ALOGE("Couldn't process %s", line); in ReportChargeStats() 169 void UeventListener::ReportVoltageTierStats(sp<IStats> &stats_client, const char *line) { in ReportVoltageTierStats() argument 191 ALOGD("VoltageTierStats: processing %s", line); in ReportVoltageTierStats() 192 if (sscanf(line, "%d, %f,%d,%d, %d,%d,%d, %d,%d,%d, %d,%d,%d, %d,%d,%d", &tmp[0], &ssoc_tmp, in ReportVoltageTierStats() 195 ALOGE("Couldn't process %s", line); in ReportVoltageTierStats() 220 std::string file_contents, line; in ReportChargeMetricsEvent() local 229 if (!std::getline(ss, line)) { in ReportChargeMetricsEvent() [all …]
|
/hardware/qcom/display/msm8909/libqdutils/ |
D | qd_utils.cpp | 138 char *line = stringBuffer; in querySDEInfoFB() local 139 while ((read = getline(&line, &len, fileptr)) != -1) { in querySDEInfoFB() 141 if (parseLine(line, tokens, maxCount, &tokenCount)) { in querySDEInfoFB() 208 char *line = stringBuffer; in isDPConnected() local 225 if (getline(&line, &len, connectFile) < 0) { in isDPConnected() 232 return atoi(line); in isDPConnected() 247 char *line = stringBuffer; in getDPTestConfig() local 264 while (getline(&line, &len, configFile) != -1) { in getDPTestConfig() 265 if (!parseLine(line, tokens, maxCount, &tokenCount)) { in getDPTestConfig()
|
/hardware/qcom/sdm845/display/libqdutils/ |
D | qd_utils.cpp | 139 char *line = stringBuffer; in querySDEInfoFB() local 140 while ((read = getline(&line, &len, fileptr)) != -1) { in querySDEInfoFB() 142 if (parseLine(line, tokens, maxCount, &tokenCount)) { in querySDEInfoFB() 209 char *line = stringBuffer; in isDPConnected() local 226 if (getline(&line, &len, connectFile) < 0) { in isDPConnected() 233 return atoi(line); in isDPConnected() 248 char *line = stringBuffer; in getDPTestConfig() local 265 while (getline(&line, &len, configFile) != -1) { in getDPTestConfig() 266 if (!parseLine(line, tokens, maxCount, &tokenCount)) { in getDPTestConfig()
|
/hardware/qcom/display/msm8998/libqdutils/ |
D | qd_utils.cpp | 138 char *line = stringBuffer; in querySDEInfoFB() local 139 while ((read = getline(&line, &len, fileptr)) != -1) { in querySDEInfoFB() 141 if (parseLine(line, tokens, maxCount, &tokenCount)) { in querySDEInfoFB() 208 char *line = stringBuffer; in isDPConnected() local 225 if (getline(&line, &len, connectFile) < 0) { in isDPConnected() 232 return atoi(line); in isDPConnected() 247 char *line = stringBuffer; in getDPTestConfig() local 264 while (getline(&line, &len, configFile) != -1) { in getDPTestConfig() 265 if (!parseLine(line, tokens, maxCount, &tokenCount)) { in getDPTestConfig()
|
/hardware/qcom/display/msm8909w_3100/libqdutils/ |
D | qd_utils.cpp | 138 char *line = stringBuffer; in querySDEInfoFB() local 139 while ((read = getline(&line, &len, fileptr)) != -1) { in querySDEInfoFB() 141 if (parseLine(line, tokens, maxCount, &tokenCount)) { in querySDEInfoFB() 208 char *line = stringBuffer; in isDPConnected() local 225 if (getline(&line, &len, connectFile) < 0) { in isDPConnected() 232 return atoi(line); in isDPConnected() 247 char *line = stringBuffer; in getDPTestConfig() local 264 while (getline(&line, &len, configFile) != -1) { in getDPTestConfig() 265 if (!parseLine(line, tokens, maxCount, &tokenCount)) { in getDPTestConfig()
|
/hardware/interfaces/prebuilt_hashes/ |
D | dump_hals_for_release.py | 38 def trim_trailing_comments(line): argument 39 idx = line.find('#') 40 if idx < 0: return line 41 return line[0:idx] 55 for line in file: 56 line_tokens = trim_trailing_comments(line).strip().split() 60 "Unrecognized line in file {}:\n{}".format(file_name, line)
|
/hardware/broadcom/libbt/src/ |
D | conf.c | 100 char line[CONF_MAX_LINE_LEN+1]; /* add 1 for \0 char */ in vnd_load_conf() local 107 while (fgets(line, CONF_MAX_LINE_LEN+1, p_file) != NULL) in vnd_load_conf() 109 if (line[0] == CONF_COMMENT) in vnd_load_conf() 112 p_name = strtok(line, CONF_DELIMITERS); in vnd_load_conf()
|
/hardware/qcom/gps/msm8084/utils/ |
D | loc_target.cpp | 69 static int read_a_line(const char * file_path, char * line, int line_size) in read_a_line() argument 74 * line = '\0'; in read_a_line() 81 fgets(line, line_size, fp); in read_a_line() 82 len = strlen(line); in read_a_line() 84 line[len] = '\0'; in read_a_line() 85 LOC_LOGD("cat %s: %s", file_path, line); in read_a_line()
|