Searched refs:tmp_fd (Results 1 – 3 of 3) sorted by relevance
/linux-6.12.1/tools/testing/selftests/bpf/prog_tests/ |
D | mmap.c | 22 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-6.12.1/tools/lib/bpf/ |
D | libbpf_internal.h | 634 static inline int reuse_fd(int fixed_fd, int tmp_fd) in reuse_fd() argument 638 err = sys_dup3(tmp_fd, fixed_fd, O_CLOEXEC); in reuse_fd() 640 close(tmp_fd); /* clean up temporary FD */ in reuse_fd()
|
/linux-6.12.1/tools/perf/ |
D | builtin-inject.c | 85 int tmp_fd; member 1039 ssize_t ret = writen(gs->tmp_fd, buf, sz); in guest_session__output_bytes() 1466 gs->tmp_fd = mkstemp(gs->tmp_file_name); in guest_session__start() 1467 if (gs->tmp_fd < 0) in guest_session__start() 1481 if (lseek(gs->tmp_fd, 0, SEEK_SET)) in guest_session__start() 1509 if (gs->tmp_fd >= 0) in guest_session__exit() 1510 close(gs->tmp_fd); in guest_session__exit() 1579 ret = readn(gs->tmp_fd, buf, hdr_sz); in guest_session__fetch() 1591 ret = readn(gs->tmp_fd, buf, hdr->size - hdr_sz); in guest_session__fetch()
|