Home | History | Annotate | Download | only in procstatlog

Lines Matching defs:line

49 // /proc/binder/stats - per line: "/proc/binder/stats:BC_REPLY"
52 // /proc/stat - per line: "/proc/stat:intr"
53 // /proc/yaffs - per device/line: "/proc/yaffs:userdata:nBlockErasures"
55 // - per line: "/sys/.../time_in_state:245000"
96 // Read a name/value file and write data entries for each line.
99 // delimiter: used to split each line into name and value
101 // skip_words: skip this many words at the start of each line
126 char *line;
127 for (line = strtok(buf, "\n");
128 line != NULL && num < stats_count;
129 line = strtok(NULL, "\n")) {
130 // Line format: <sp>name<delim><sp>value
133 while (isspace(*line)) ++line;
135 while (isgraph(*line)) ++line;
136 while (isspace(*line)) ++line;
139 char *name_end = strchr(line, delimiter);
144 data->name = malloc(filename_len + 1 + (name_end - line) + 1);
147 unspace(data->name + filename_len + 1, line, name_end - line);
148 data->name[filename_len + 1 + (name_end - line)] = '\0';
158 // Read /proc/yaffs and write data entries for each line.
175 char *line, *device = NULL;
176 for (line = strtok(buf, "\n");
177 line != NULL && num < stats_count;
178 line = strtok(NULL, "\n")) {
179 if (strncmp(line, "Device ", 7) == 0) {
180 device = strchr(line, '"');
190 char *name_end = line + strcspn(line, " .");
191 if (name_end == line || *name_end == '\0') continue;
194 data->name = malloc(12 + device_len + 1 + (name_end - line) + 1);
198 unspace(data->name + 12 + device_len + 1, line, name_end - line);
199 data->name[12 + device_len + 1 + (name_end - line)] = '\0';