Lines Matching refs:buf
45 static int __do_read(int fd, void *buf, int size) in __do_read() argument
50 int ret = read(fd, buf, size); in __do_read()
56 int retw = write(STDOUT_FILENO, buf, ret); in __do_read()
65 buf += ret; in __do_read()
90 char buf[BUFSIZ]; in skip() local
95 do_read(buf, r); in skip()
120 char buf[BUFSIZ]; in read_string() local
147 buf[size++] = c; in read_string()
157 memcpy(str, buf, size); in read_string()
188 char *buf; in read_ftrace_printk() local
195 buf = malloc(size); in read_ftrace_printk()
196 if (buf == NULL) in read_ftrace_printk()
199 if (do_read(buf, size) < 0) { in read_ftrace_printk()
200 free(buf); in read_ftrace_printk()
204 parse_ftrace_printk(pevent, buf, size); in read_ftrace_printk()
206 free(buf); in read_ftrace_printk()
214 char buf[BUFSIZ]; in read_header_files() local
217 if (do_read(buf, 12) < 0) in read_header_files()
220 if (memcmp(buf, "header_page", 12) != 0) { in read_header_files()
247 if (do_read(buf, 13) < 0) in read_header_files()
250 if (memcmp(buf, "header_event", 13) != 0) { in read_header_files()
263 char *buf; in read_ftrace_file() local
265 buf = malloc(size); in read_ftrace_file()
266 if (buf == NULL) in read_ftrace_file()
269 if (do_read(buf, size) < 0) { in read_ftrace_file()
270 free(buf); in read_ftrace_file()
274 parse_ftrace_file(pevent, buf, size); in read_ftrace_file()
275 free(buf); in read_ftrace_file()
282 char *buf; in read_event_file() local
284 buf = malloc(size); in read_event_file()
285 if (buf == NULL) in read_event_file()
288 if (do_read(buf, size) < 0) { in read_event_file()
289 free(buf); in read_event_file()
293 parse_event_file(pevent, buf, size, sys); in read_event_file()
294 free(buf); in read_event_file()
346 char buf[BUFSIZ]; in trace_report() local
363 if (do_read(buf, 3) < 0) in trace_report()
365 if (memcmp(buf, test, 3) != 0) { in trace_report()
370 if (do_read(buf, 7) < 0) in trace_report()
372 if (memcmp(buf, "tracing", 7) != 0) { in trace_report()
384 if (do_read(buf, 1) < 0) in trace_report()
386 file_bigendian = buf[0]; in trace_report()
400 if (do_read(buf, 1) < 0) in trace_report()
402 file_long_size = buf[0]; in trace_report()