Searched defs:line (Results 1 - 25 of 30) sorted by relevance

12

/system/core/fastbootd/
H A Dconfig.c45 static int config_parse_line(char *line) argument
51 c = strchr(line, '#');
55 if (strspn(line, " \t") == strlen(line))
58 c = strchr(line, '=');
62 key = line;
81 char *line = buffer; local
85 for (c = 1; line != NULL; c++) {
86 line = strtok_r(str, "\r\n", &saveptr);
87 if (line !
[all...]
/system/core/init/
H A Dparser.h28 int line; member in struct:parse_state
H A Dinit.h33 int line; member in struct:command
/system/core/libbacktrace/
H A DBacktraceMap.cpp50 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)) {
H A DGetPss.cpp57 char line[4096]; local
60 while (fgets(line, sizeof(line), maps)) {
62 if (sscanf(line, "%" SCNxPTR "-%" SCNxPTR " ", &start, &end) != 2) {
H A Dmap_info.c35 static backtrace_map_info_t* parse_vmmap_line(const char* line) { argument
40 if (sscanf(line, "%*21c %lx-%lx [%*13c] %3c/%*3c SM=%*3c %n",
45 const char* name = line + name_pos;
76 char line[1024]; local
78 while (fgets(line, sizeof(line), fp) != NULL) {
79 backtrace_map_info_t* mi = parse_vmmap_line(line);
95 static backtrace_map_info_t* parse_maps_line(const char* line) argument
101 if (sscanf(line, "%lx-%lx %4s %*x %*x:%*x %*d%n", &start, &end,
106 while (isspace(line[name_po
134 char line[1024]; local
[all...]
/system/core/logd/
H A DLogCommand.cpp31 // /proc/PID/status and look for the "Group:" line.
85 char line[1024]; local
86 while (fgets(line, sizeof(line), file)) {
91 if (strncmp(groups_string, line, strlen(groups_string)) == 0) {
92 ret = groupIsLog(line + strlen(groups_string));
96 } else if (strncmp(uid_string, line, strlen(uid_string)) == 0) {
99 sscanf(line + strlen(uid_string), "%u\t%u\t%u\t%u",
108 } else if (strncmp(gid_string, line, strlen(gid_string)) == 0) {
111 sscanf(line
[all...]
/system/extras/ext4_utils/
H A Dcanned_fs_config.c50 char line[PATH_MAX + 200]; local
51 while (fgets(line, sizeof(line), f)) {
57 p->path = strdup(strtok(line, " "));
/system/core/toolbox/upstream-netbsd/bin/cat/
H A Dcat.c173 int ch, gobble, line, prev; local
175 line = gobble = 0;
182 "%6d\t\n", ++line);
191 "%6d\t", ++line);
202 (void)fprintf(stdout, "%6d\t", ++line);
/system/core/cpio/
H A Dmkbootfs.c45 /* Each line in the canned file should be a path plus three ints (uid,
290 char line[CANNED_LINE_LENGTH]; local
294 while (fgets(line, CANNED_LINE_LENGTH, f) != NULL) {
295 if (!line[0]) break;
304 if (isspace(line[0])) {
306 cc->uid = atoi(strtok(line, " \n"));
308 cc->name = strdup(strtok(line, " \n"));
/system/core/debuggerd/
H A Ddebuggerd.cpp109 char line[1024]; local
110 while (fgets(line, sizeof(line), fp)) {
111 size_t len = strlen(line);
112 if (len > 6 && !memcmp(line, "Tgid:\t", 6)) {
113 *out_pid = atoi(line + 6);
115 } else if (len > 5 && !memcmp(line, "Uid:\t", 5)) {
116 *out_uid = atoi(line + 5);
118 } else if (len > 5 && !memcmp(line, "Gid:\t", 5)) {
119 *out_gid = atoi(line
[all...]
/system/core/fs_mgr/
H A Dfs_mgr_fstab.c186 char *line = NULL; local
201 while ((len = getline(&line, &alloc_len, fstab_file)) != -1) {
203 if (line[len - 1] == '\n') {
204 line[len - 1] = '\0';
207 p = line;
231 while ((len = getline(&line, &alloc_len, fstab_file)) != -1) {
233 if (line[len - 1] == '\n') {
234 line[len - 1] = '\0';
238 p = line;
255 if (!(p = strtok_r(line, deli
[all...]
/system/core/toolbox/
H A Dschedtop.c76 static int read_line(char *line, size_t line_size) argument
80 fd = open(line, O_RDONLY);
83 len = read(fd, line, line_size - 1);
87 line[len] = '\0';
93 char line[1024]; local
105 sprintf(line, "/proc/%d/task/%d/schedstat", pid, tid);
107 sprintf(line, "/proc/%d/schedstat", pid);
108 if (read_line(line, sizeof(line)))
110 if(sscanf(line, "
[all...]
H A Dvmstat.c62 char line[MAX_LINE]; variable
165 while (fgets(line, MAX_LINE, f)) {
166 sscanf(line, "MemFree: %ld kB", &s->mem_free);
167 sscanf(line, "AnonPages: %ld kB", &s->mem_anon);
168 sscanf(line, "Mapped: %ld kB", &s->mem_mapped);
169 sscanf(line, "Slab: %ld kB", &s->mem_slab);
183 while (fgets(line, MAX_LINE, f)) {
184 if (!strncmp(line, "cpu ", 4)) {
185 sscanf(line, "cpu %ld %ld %ld %ld %ld %ld %ld",
189 sscanf(line, "int
[all...]
/system/core/toolbox/upstream-netbsd/usr.bin/grep/
H A Dutil.c184 * Opens a file and processes it. Each file is processed line-by-line
244 /* Process the file line-by-line */
280 * Processes a line comparing it with the specified patterns. Each pattern
295 /* Loop to process the whole line */
441 * Prints a matching line according to the command line options.
444 printline(struct str *line, int sep, regmatch_t *matches, int m) argument
451 fputs(line
[all...]
/system/extras/cpustats/
H A Dcpustats.c188 char line[MAX_BUF_SIZE]; local
193 if (!fgets(line, MAX_BUF_SIZE, file)) die("Could not get %s contents\n", filename);
196 if (strcmp(line, "0\n") == 0) {
200 if (1 == sscanf(line, "0-%d\n", &cpu_count)) {
204 die("Unexpected input in file %s (%s).\n", filename, line);
/system/extras/latencytop/
H A Dlatencytop.c327 char line[MAX_LINE]; local
333 if (!fgets(line, MAX_LINE, f)) {
338 if (strcmp(line, EXPECTED_VERSION) != 0) {
340 fprintf(stderr, "But got version: %s", line);
344 while (fgets(line, MAX_LINE, f)) {
345 sscanf(line, "%ld %ld %ld %s", &count, &total, &max, reason);
/system/extras/libpagemap/
H A Dpm_process.c246 char line[MAX_LINE], name[MAX_LINE], perms[MAX_PERMS]; local
268 while (fgets(line, MAX_LINE, maps_f)) {
286 sscanf(line, "%" SCNx64 "-%" SCNx64 " %s %" SCNx64 " %*s %*d %" S(MAX_LINE) "s",
/system/extras/showmap/
H A Dshowmap.c40 static int parse_header(const char* line, const mapinfo* prev, mapinfo** mi) { argument
47 if (sscanf(line, "%lx-%lx %*s %*x %*x:%*x %*d%n", &start, &end, &name_pos) != 2) {
52 while (isspace(line[name_pos])) {
56 if (line[name_pos]) {
57 strlcpy(name, line + name_pos, sizeof(name));
87 static int parse_field(mapinfo* mi, const char* line) { argument
91 if (sscanf(line, "%63s %n", field, &len) == 1
94 if (sscanf(line + len, "%d kB", &size) == 1) {
167 char line[1024]; local
179 while (fgets(line, sizeo
[all...]
/system/extras/showslab/
H A Dshowslab.c13 #define SLABINFO_LINE_LEN 512 /* size of longest line */
18 /* object representing a slab cache (each line of slabinfo) */
64 char line[SLABINFO_LINE_LEN]; local
73 if (!fgets(line, SLABINFO_LINE_LEN, slabfile)) {
78 if (sscanf(line, "slabinfo - version: %u.%u", &major, &minor) != 2) {
90 while (fgets(line, SLABINFO_LINE_LEN, slabfile)) {
94 if (line[0] == '#')
106 ret = sscanf(line, "%" STRINGIFY(SLABINFO_NAME_LEN) "s"
215 * Sort Routines. Each of these should be associated with a command-line
/system/extras/tests/lib/testUtil/
H A DtestUtil.c147 char line[MAXSTR]; local
151 vsnprintf(line, sizeof(line), fmt, args);
153 ALOG(LOG_ERROR, logCatTag, "%s", line);
155 ALOG(LOG_INFO, logCatTag, "%s", line);
311 * Each line of output is indented by a number of spaces that
323 char line[MAXSTR]; local
326 char *linep = line;
330 if (linep != line) {
331 testPrintE("%s", line);
[all...]
/system/vold/
H A DCommandListener.cpp105 char line[1024]; local
106 while (fgets(line, sizeof(line), fp)) {
107 line[strlen(line)-1] = '\0';
108 cli->sendMsg(0, line, false);;
H A DVolume.cpp295 char line[1024]; local
302 while(fgets(line, sizeof(line), fp)) {
303 line[strlen(line)-1] = '\0';
304 sscanf(line, "%255s %255s %255s\n", device, mount_path, rest);
666 char line[1024]; local
668 if (fgets(line, sizeof(line), fp) != NULL) {
669 ALOGD("blkid identified as %s", line);
[all...]
/system/core/gpttool/
H A Dgpttool.c319 char line[256], *p; local
326 while (fgets(line, sizeof(line), f)) {
327 p = line + strlen(line);
328 while (p > line) {
334 p = line;
/system/core/logwrapper/
H A Dlogwrap.c105 char *line, ssize_t line_len)
113 memcpy(b_buf->buf + b_buf->used_len, line, line_len);
121 char *line, ssize_t line_len)
145 /* Copy the line into the circular buffer, dealing with possible
149 memcpy(e_buf->buf + e_buf->write, line, cnt);
151 memcpy(e_buf->buf, line + cnt, line_len - cnt);
158 static void do_log_line(struct log_info *log_info, char *line) { argument
160 klog_write(6, log_info->klog_fmt, line);
163 ALOG(LOG_INFO, log_info->btag, "%s", line);
166 fprintf(log_info->fp, "%s\n", line);
104 add_line_to_linear_buf(struct beginning_buf *b_buf, char *line, ssize_t line_len) argument
120 add_line_to_circular_buf(struct ending_buf *e_buf, char *line, ssize_t line_len) argument
173 log_line(struct log_info *log_info, char *line, int len) argument
[all...]

Completed in 310 milliseconds

12