Lines Matching refs:buf_size
95 size_t buf_size; in filename__read_build_id() local
128 buf_size = ehdr.e_phentsize * ehdr.e_phnum; in filename__read_build_id()
129 buf = malloc(buf_size); in filename__read_build_id()
134 if (fread(buf, buf_size, 1, fp) != 1) in filename__read_build_id()
150 buf_size = phdr->p_filesz; in filename__read_build_id()
152 tmp = realloc(buf, buf_size); in filename__read_build_id()
158 if (fread(buf, buf_size, 1, fp) != 1) in filename__read_build_id()
161 ret = read_build_id(buf, buf_size, bid, need_swap); in filename__read_build_id()
179 buf_size = ehdr.e_phentsize * ehdr.e_phnum; in filename__read_build_id()
180 buf = malloc(buf_size); in filename__read_build_id()
185 if (fread(buf, buf_size, 1, fp) != 1) in filename__read_build_id()
201 buf_size = phdr->p_filesz; in filename__read_build_id()
203 tmp = realloc(buf, buf_size); in filename__read_build_id()
209 if (fread(buf, buf_size, 1, fp) != 1) in filename__read_build_id()
212 ret = read_build_id(buf, buf_size, bid, need_swap); in filename__read_build_id()
230 size_t buf_size; in sysfs__read_build_id() local
240 buf_size = stbuf.st_size; in sysfs__read_build_id()
241 buf = malloc(buf_size); in sysfs__read_build_id()
245 if (read(fd, buf, buf_size) != (ssize_t) buf_size) in sysfs__read_build_id()
248 ret = read_build_id(buf, buf_size, bid, false); in sysfs__read_build_id()