Lines Matching refs:fd
220 int fd; in sysfs__read_build_id() local
226 fd = open(filename, O_RDONLY); in sysfs__read_build_id()
227 if (fd < 0) in sysfs__read_build_id()
230 if (fstat(fd, &stbuf) < 0) in sysfs__read_build_id()
238 if (read(fd, buf, buf_size) != (ssize_t) buf_size) in sysfs__read_build_id()
245 close(fd); in sysfs__read_build_id()
252 int fd = open(name, O_RDONLY); in symsrc__init() local
253 if (fd < 0) in symsrc__init()
260 ss->fd = fd; in symsrc__init()
265 close(fd); in symsrc__init()
285 close(ss->fd); in symsrc__destroy()
296 static int fd__is_64_bit(int fd) in fd__is_64_bit() argument
300 if (lseek(fd, 0, SEEK_SET)) in fd__is_64_bit()
303 if (readn(fd, e_ident, sizeof(e_ident)) != sizeof(e_ident)) in fd__is_64_bit()
313 enum dso_type dso__type_fd(int fd) in dso__type_fd() argument
318 ret = fd__is_64_bit(fd); in dso__type_fd()
325 if (readn(fd, &ehdr, sizeof(ehdr)) != sizeof(ehdr)) in dso__type_fd()
343 ret = fd__is_64_bit(ss->fd); in dso__load_sym()
353 int file__read_maps(int fd __maybe_unused, bool exe __maybe_unused, in file__read_maps()