Home
last modified time | relevance | path

Searched refs:tmp_fd (Results 1 – 4 of 4) sorted by relevance

/linux/tools/testing/selftests/bpf/prog_tests/
H A Dcgroup_xattr.c26 int tmp_fd, parent_cgroup_fd = -1, child_cgroup_fd = -1; in test_read_cgroup_xattr() local
52 tmp_fd = open(TMP_FILE, O_RDONLY | O_CREAT); in test_read_cgroup_xattr()
53 ASSERT_OK_FD(tmp_fd, "open tmp file"); in test_read_cgroup_xattr()
54 close(tmp_fd); in test_read_cgroup_xattr()
H A Dmmap.c22 int err, duration = 0, i, data_map_fd, data_map_id, tmp_fd, rdmap_fd; in test_mmap() local
272 tmp_fd = bpf_map_get_fd_by_id(data_map_id); in test_mmap()
273 if (CHECK(tmp_fd < 0, "get_map_by_id", "failed %d\n", errno)) { in test_mmap()
277 close(tmp_fd); in test_mmap()
291 tmp_fd = bpf_map_get_fd_by_id(data_map_id); in test_mmap()
292 if (CHECK(tmp_fd >= 0, "get_map_by_id_after", in test_mmap()
293 "unexpectedly succeeded %d\n", tmp_fd)) { in test_mmap()
294 close(tmp_fd); in test_mmap()
/linux/tools/lib/bpf/
H A Dlibbpf_internal.h705 /* Point *fixed_fd* to the same file that *tmp_fd* points to. in reuse_fd()
706 * Regardless of success, *tmp_fd* is closed.
709 static inline int reuse_fd(int fixed_fd, int tmp_fd)
713 err = sys_dup3(tmp_fd, fixed_fd, O_CLOEXEC);
715 close(tmp_fd); /* clean up temporary FD */
697 reuse_fd(int fixed_fd,int tmp_fd) reuse_fd() argument
/linux/tools/perf/
H A Dbuiltin-inject.c88 int tmp_fd;
1267 ssize_t ret = writen(gs->tmp_fd, buf, sz); in guest_session__map_ids()
1695 gs->tmp_fd = mkstemp(gs->tmp_file_name); in guest_session__fetch()
1696 if (gs->tmp_fd < 0) in guest_session__fetch()
1710 if (lseek(gs->tmp_fd, 0, SEEK_SET)) in evlist__append_id_sample()
1738 if (gs->tmp_fd >= 0) in guest_session__inject_events()
1739 close(gs->tmp_fd); in guest_session__inject_events()
1809 ret = readn(gs->tmp_fd, buf, hdr_sz); in guest_session__inject_events()
1821 ret = readn(gs->tmp_fd, buf, hdr->size - hdr_sz); in guest_session__inject_events()
85 int tmp_fd; global() member