/system/core/fastbootd/ |
D | config.c | 45 static int config_parse_line(char *line) in config_parse_line() argument 51 c = strchr(line, '#'); in config_parse_line() 55 if (strspn(line, " \t") == strlen(line)) in config_parse_line() 58 c = strchr(line, '='); in config_parse_line() 62 key = line; in config_parse_line() 81 char *line = buffer; in config_parse() local 85 for (c = 1; line != NULL; c++) { in config_parse() 86 line = strtok_r(str, "\r\n", &saveptr); in config_parse() 87 if (line != NULL) { in config_parse() 88 D(VERBOSE, "'%s'", line); in config_parse() [all …]
|
/system/core/libbacktrace/ |
D | map_info.c | 35 static backtrace_map_info_t* parse_vmmap_line(const char* line) { in parse_vmmap_line() argument 40 if (sscanf(line, "%*21c %lx-%lx [%*13c] %3c/%*3c SM=%*3c %n", in parse_vmmap_line() 45 const char* name = line + name_pos; in parse_vmmap_line() 76 char line[1024]; in backtrace_create_map_info_list() local 78 while (fgets(line, sizeof(line), fp) != NULL) { in backtrace_create_map_info_list() 79 backtrace_map_info_t* mi = parse_vmmap_line(line); in backtrace_create_map_info_list() 95 static backtrace_map_info_t* parse_maps_line(const char* line) in parse_maps_line() argument 101 if (sscanf(line, "%lx-%lx %4s %*x %*x:%*x %*d%n", &start, &end, in parse_maps_line() 106 while (isspace(line[name_pos])) { in parse_maps_line() 109 const char* name = line + name_pos; in parse_maps_line() [all …]
|
D | BacktraceMap.cpp | 50 bool BacktraceMap::ParseLine(const char* line, backtrace_map_t* map) { argument 61 if (sscanf(line, "%*21c %lx-%lx [%*13c] %3c/%*3c SM=%*3c %n", 68 if (sscanf(line, "%lx-%lx %4s %*x %*x:%*x %*d%n", 87 while (isspace(line[name_pos])) { 90 map->name = line+name_pos; 107 char line[1024]; local 122 while(fgets(line, sizeof(line), fp)) { 124 if (ParseLine(line, &map)) {
|
D | GetPss.cpp | 57 char line[4096]; in GetPssBytes() local 60 while (fgets(line, sizeof(line), maps)) { in GetPssBytes() 62 if (sscanf(line, "%" SCNxPTR "-%" SCNxPTR " ", &start, &end) != 2) { in GetPssBytes()
|
/system/extras/tests/sdcard/ |
D | plot_sdcard.py | 50 def __init__(self, line): argument 52 'duration ([0-9.]+). Samples: ([0-9]+)'), line) 97 def Parse(self, line): argument 98 if line.startswith('# Kernel:'): 99 self.kernel = re.search('Linux version ([0-9.]+-[^ ]+)', line).group(1) 100 elif line.startswith('# Command:'): 101 self.command_line = re.search('# Command: [/\w_]+ (.*)', line).group(1) 105 elif line.startswith('# Iterations'): 106 self.iterations = int(re.search('# Iterations: ([0-9]+)', line).group(1)) 107 elif line.startswith('# Fadvise'): [all …]
|
/system/core/logd/ |
D | LogCommand.cpp | 85 char line[1024]; in clientHasLogCredentials() local 86 while (fgets(line, sizeof(line), file)) { in clientHasLogCredentials() 91 if (strncmp(groups_string, line, strlen(groups_string)) == 0) { in clientHasLogCredentials() 92 ret = groupIsLog(line + strlen(groups_string)); in clientHasLogCredentials() 96 } else if (strncmp(uid_string, line, strlen(uid_string)) == 0) { in clientHasLogCredentials() 99 sscanf(line + strlen(uid_string), "%u\t%u\t%u\t%u", in clientHasLogCredentials() 108 } else if (strncmp(gid_string, line, strlen(gid_string)) == 0) { in clientHasLogCredentials() 111 sscanf(line + strlen(gid_string), "%u\t%u\t%u\t%u", in clientHasLogCredentials()
|
/system/extras/tests/lib/testUtil/ |
D | testUtil.c | 147 char line[MAXSTR]; in testPrint() local 151 vsnprintf(line, sizeof(line), fmt, args); in testPrint() 153 ALOG(LOG_ERROR, logCatTag, "%s", line); in testPrint() 155 ALOG(LOG_INFO, logCatTag, "%s", line); in testPrint() 323 char line[MAXSTR]; in testXDump() local 326 char *linep = line; in testXDump() 330 if (linep != line) { in testXDump() 331 testPrintE("%s", line); in testXDump() 333 linep = line; in testXDump() 334 rv = snprintf(linep, ALEN(line) - (linep - line), in testXDump() [all …]
|
/system/core/toolbox/ |
D | schedtop.c | 76 static int read_line(char *line, size_t line_size) in read_line() argument 80 fd = open(line, O_RDONLY); in read_line() 83 len = read(fd, line, line_size - 1); in read_line() 87 line[len] = '\0'; in read_line() 93 char line[1024]; in add_thread() local 105 sprintf(line, "/proc/%d/task/%d/schedstat", pid, tid); in add_thread() 107 sprintf(line, "/proc/%d/schedstat", pid); in add_thread() 108 if (read_line(line, sizeof(line))) in add_thread() 110 if(sscanf(line, "%llu %llu %llu", in add_thread() 121 sprintf(line, "/proc/%d/cmdline", pid); in add_thread() [all …]
|
D | vmstat.c | 62 char line[MAX_LINE]; variable 165 while (fgets(line, MAX_LINE, f)) { in read_meminfo() 166 sscanf(line, "MemFree: %ld kB", &s->mem_free); in read_meminfo() 167 sscanf(line, "AnonPages: %ld kB", &s->mem_anon); in read_meminfo() 168 sscanf(line, "Mapped: %ld kB", &s->mem_mapped); in read_meminfo() 169 sscanf(line, "Slab: %ld kB", &s->mem_slab); in read_meminfo() 183 while (fgets(line, MAX_LINE, f)) { in read_stat() 184 if (!strncmp(line, "cpu ", 4)) { in read_stat() 185 sscanf(line, "cpu %ld %ld %ld %ld %ld %ld %ld", in read_stat() 189 sscanf(line, "intr %ld", &s->sys_in); in read_stat() [all …]
|
D | top.c | 370 char line[MAX_LINE]; in read_cmdline() local 372 line[0] = '\0'; in read_cmdline() 375 fgets(line, MAX_LINE, file); in read_cmdline() 377 if (strlen(line) > 0) { in read_cmdline() 378 strncpy(proc->name, line, PROC_NAME_LEN); in read_cmdline() 397 char line[MAX_LINE]; in read_status() local 402 while (fgets(line, MAX_LINE, file)) { in read_status() 403 sscanf(line, "Uid: %u", &uid); in read_status() 404 sscanf(line, "Gid: %u", &gid); in read_status()
|
/system/extras/showmap/ |
D | showmap.c | 40 static int parse_header(const char* line, const mapinfo* prev, mapinfo** mi) { in parse_header() argument 47 if (sscanf(line, "%lx-%lx %*s %*x %*x:%*x %*d%n", &start, &end, &name_pos) != 2) { in parse_header() 52 while (isspace(line[name_pos])) { in parse_header() 56 if (line[name_pos]) { in parse_header() 57 strlcpy(name, line + name_pos, sizeof(name)); in parse_header() 87 static int parse_field(mapinfo* mi, const char* line) { in parse_field() argument 91 if (sscanf(line, "%63s %n", field, &len) == 1 in parse_field() 94 if (sscanf(line + len, "%d kB", &size) == 1) { in parse_field() 167 char line[1024]; in load_maps() local 179 while (fgets(line, sizeof(line), fp) != 0) { in load_maps() [all …]
|
/system/core/fs_mgr/ |
D | fs_mgr_fstab.c | 185 char *line = NULL; in fs_mgr_read_fstab() local 200 while ((len = getline(&line, &alloc_len, fstab_file)) != -1) { in fs_mgr_read_fstab() 202 if (line[len - 1] == '\n') { in fs_mgr_read_fstab() 203 line[len - 1] = '\0'; in fs_mgr_read_fstab() 206 p = line; in fs_mgr_read_fstab() 230 while ((len = getline(&line, &alloc_len, fstab_file)) != -1) { in fs_mgr_read_fstab() 232 if (line[len - 1] == '\n') { in fs_mgr_read_fstab() 233 line[len - 1] = '\0'; in fs_mgr_read_fstab() 237 p = line; in fs_mgr_read_fstab() 254 if (!(p = strtok_r(line, delim, &save_ptr))) { in fs_mgr_read_fstab() [all …]
|
/system/core/toolbox/upstream-netbsd/usr.bin/grep/ |
D | util.c | 444 printline(struct str *line, int sep, regmatch_t *matches, int m) in printline() argument 451 fputs(line->file, stdout); in printline() 453 printf("%s", line->file); in printline() 461 printf("%d", line->line_no); in printline() 467 printf("%lld", (long long)line->off); in printline() 476 fwrite(line->dat + a, matches[i].rm_so - a, 1, in printline() 481 fwrite(line->dat + matches[i].rm_so, in printline() 491 if (line->len - a > 0) in printline() 492 fwrite(line->dat + a, line->len - a, 1, stdout); in printline() 496 fwrite(line->dat, line->len, 1, stdout); in printline()
|
D | grep.c | 288 char *line; in read_patterns() local 294 line = NULL; in read_patterns() 296 while ((rlen = getline(&line, &len, f)) != -1) in read_patterns() 297 add_pattern(line, *line == '\n' ? 0 : (size_t)rlen); in read_patterns() 298 free(line); in read_patterns()
|
/system/core/lmkd/ |
D | lmkd.c | 455 static void zoneinfo_parse_line(char *line, struct sysmeminfo *mip) { in zoneinfo_parse_line() argument 456 char *cp = line; in zoneinfo_parse_line() 460 cp = strtok_r(line, " ", &save_ptr); in zoneinfo_parse_line() 485 char *line; in zoneinfo_parse() local 504 for (line = strtok_r(buf, "\n", &save_ptr); line; line = strtok_r(NULL, "\n", &save_ptr)) in zoneinfo_parse() 505 zoneinfo_parse_line(line, mip); in zoneinfo_parse() 513 char line[LINE_MAX]; in proc_get_size() local 524 ret = read_all(fd, line, sizeof(line) - 1); in proc_get_size() 530 sscanf(line, "%d %d ", &total, &rss); in proc_get_size() 537 static char line[LINE_MAX]; in proc_get_name() local [all …]
|
/system/extras/ext4_utils/ |
D | canned_fs_config.c | 50 char line[PATH_MAX + 200]; in load_canned_fs_config() local 51 while (fgets(line, sizeof(line), f)) { in load_canned_fs_config() 57 p->path = strdup(strtok(line, " ")); in load_canned_fs_config()
|
/system/core/debuggerd/ |
D | debuggerd.cpp | 109 char line[1024]; in get_process_info() local 110 while (fgets(line, sizeof(line), fp)) { in get_process_info() 111 size_t len = strlen(line); in get_process_info() 112 if (len > 6 && !memcmp(line, "Tgid:\t", 6)) { in get_process_info() 113 *out_pid = atoi(line + 6); in get_process_info() 115 } else if (len > 5 && !memcmp(line, "Uid:\t", 5)) { in get_process_info() 116 *out_uid = atoi(line + 5); in get_process_info() 118 } else if (len > 5 && !memcmp(line, "Gid:\t", 5)) { in get_process_info() 119 *out_gid = atoi(line + 5); in get_process_info()
|
/system/core/logwrapper/ |
D | logwrap.c | 105 char *line, ssize_t line_len) in add_line_to_linear_buf() argument 113 memcpy(b_buf->buf + b_buf->used_len, line, line_len); in add_line_to_linear_buf() 121 char *line, ssize_t line_len) in add_line_to_circular_buf() argument 149 memcpy(e_buf->buf + e_buf->write, line, cnt); in add_line_to_circular_buf() 151 memcpy(e_buf->buf, line + cnt, line_len - cnt); in add_line_to_circular_buf() 158 static void do_log_line(struct log_info *log_info, char *line) { in do_log_line() argument 160 klog_write(6, log_info->klog_fmt, line); in do_log_line() 163 ALOG(LOG_INFO, log_info->btag, "%s", line); in do_log_line() 166 fprintf(log_info->fp, "%s\n", line); in do_log_line() 173 static void log_line(struct log_info *log_info, char *line, int len) { in log_line() argument [all …]
|
/system/core/gpttool/ |
D | gpttool.c | 319 char line[256], *p; in main() local 326 while (fgets(line, sizeof(line), f)) { in main() 327 p = line + strlen(line); in main() 328 while (p > line) { in main() 334 p = line; in main()
|
/system/vold/ |
D | Volume.cpp | 295 char line[1024]; in isMountpointMounted() local 302 while(fgets(line, sizeof(line), fp)) { in isMountpointMounted() 303 line[strlen(line)-1] = '\0'; in isMountpointMounted() 304 sscanf(line, "%255s %255s %255s\n", device, mount_path, rest); in isMountpointMounted() 666 char line[1024]; in extractMetadata() local 668 if (fgets(line, sizeof(line), fp) != NULL) { in extractMetadata() 669 ALOGD("blkid identified as %s", line); in extractMetadata() 671 char* start = strstr(line, "UUID="); in extractMetadata() 678 start = strstr(line, "LABEL="); in extractMetadata()
|
/system/core/toolbox/upstream-netbsd/bin/cat/ |
D | cat.c | 173 int ch, gobble, line, prev; in cook_buf() local 175 line = gobble = 0; in cook_buf() 182 "%6d\t\n", ++line); in cook_buf() 191 "%6d\t", ++line); in cook_buf() 202 (void)fprintf(stdout, "%6d\t", ++line); in cook_buf()
|
/system/extras/showslab/ |
D | showslab.c | 64 char line[SLABINFO_LINE_LEN]; in get_slabinfo() local 73 if (!fgets(line, SLABINFO_LINE_LEN, slabfile)) { in get_slabinfo() 78 if (sscanf(line, "slabinfo - version: %u.%u", &major, &minor) != 2) { in get_slabinfo() 90 while (fgets(line, SLABINFO_LINE_LEN, slabfile)) { in get_slabinfo() 94 if (line[0] == '#') in get_slabinfo() 106 ret = sscanf(line, "%" STRINGIFY(SLABINFO_NAME_LEN) "s" in get_slabinfo()
|
/system/core/cpio/ |
D | mkbootfs.c | 290 char line[CANNED_LINE_LENGTH]; in read_canned_config() local 294 while (fgets(line, CANNED_LINE_LENGTH, f) != NULL) { in read_canned_config() 295 if (!line[0]) break; in read_canned_config() 304 if (isspace(line[0])) { in read_canned_config() 306 cc->uid = atoi(strtok(line, " \n")); in read_canned_config() 308 cc->name = strdup(strtok(line, " \n")); in read_canned_config()
|
/system/extras/latencytop/ |
D | latencytop.c | 327 char line[MAX_LINE]; in read_latency_file() local 333 if (!fgets(line, MAX_LINE, f)) { in read_latency_file() 338 if (strcmp(line, EXPECTED_VERSION) != 0) { in read_latency_file() 340 fprintf(stderr, "But got version: %s", line); in read_latency_file() 344 while (fgets(line, MAX_LINE, f)) { in read_latency_file() 345 sscanf(line, "%ld %ld %ld %s", &count, &total, &max, reason); in read_latency_file()
|
/system/core/init/ |
D | parser.h | 28 int line; member
|