Home
last modified time | relevance | path

Searched refs:fd1 (Results 1 – 25 of 25) sorted by relevance

/Linux-v5.15/tools/testing/selftests/powerpc/ptrace/
Dperf-hwbreak.c360 int fd1, fd2; in test_process_multi_diff_addr() local
364 fd1 = perf_process_event_open(HW_BREAKPOINT_RW, (__u64)&a, (__u64)sizeof(a)); in test_process_multi_diff_addr()
365 if (fd1 < 0) { in test_process_multi_diff_addr()
372 close(fd1); in test_process_multi_diff_addr()
377 ioctl(fd1, PERF_EVENT_IOC_RESET); in test_process_multi_diff_addr()
379 ioctl(fd1, PERF_EVENT_IOC_ENABLE); in test_process_multi_diff_addr()
382 ioctl(fd1, PERF_EVENT_IOC_DISABLE); in test_process_multi_diff_addr()
385 res = read(fd1, &breaks1, sizeof(breaks1)); in test_process_multi_diff_addr()
390 close(fd1); in test_process_multi_diff_addr()
405 int fd1, fd2; in test_process_multi_same_addr() local
[all …]
/Linux-v5.15/tools/testing/selftests/bpf/prog_tests/
Dudp_limit.c13 int fd1 = -1, fd2 = -1; in test_udp_limit() local
34 fd1 = socket(AF_INET, SOCK_DGRAM, 0); in test_udp_limit()
35 if (CHECK(fd1 < 0, "fd1", "errno %d", errno)) in test_udp_limit()
43 close(fd1); in test_udp_limit()
44 fd1 = -1; in test_udp_limit()
46 fd1 = socket(AF_INET, SOCK_DGRAM, 0); in test_udp_limit()
47 if (CHECK(fd1 < 0, "fd1-again", "errno %d", errno)) in test_udp_limit()
67 if (fd1 >= 0) in test_udp_limit()
68 close(fd1); in test_udp_limit()
Dxdp_attach.c13 int err, fd1, fd2, fd3; in test_xdp_attach() local
19 err = bpf_prog_load(file, BPF_PROG_TYPE_XDP, &obj1, &fd1); in test_xdp_attach()
22 err = bpf_obj_get_info_by_fd(fd1, &info, &len); in test_xdp_attach()
41 err = bpf_set_link_xdp_fd_opts(IFINDEX_LO, fd1, XDP_FLAGS_REPLACE, in test_xdp_attach()
56 opts.old_fd = fd1; in test_xdp_attach()
Dsockmap_listen.c924 static int add_to_sockmap(int sock_mapfd, int fd1, int fd2) in add_to_sockmap() argument
931 value = fd1; in add_to_sockmap()
/Linux-v5.15/tools/testing/selftests/net/
Dreuseaddr_conflict.c89 int fd1, fd2; in main() local
96 fd1 = open_port(0, 1); in main()
97 if (fd1 >= 0) in main()
100 fd1 = open_port(1, 1); in main()
101 if (fd1 < 0) in main()
107 close(fd1); in main()
109 fd1 = open_port(0, 1); in main()
110 if (fd1 >= 0) in main()
Dreuseport_bpf.c311 int fd1, fd2, opt; in test_extra_filter() local
314 fd1 = socket(p.recv_family, p.protocol, 0); in test_extra_filter()
315 if (fd1 < 0) in test_extra_filter()
322 if (setsockopt(fd1, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt))) in test_extra_filter()
327 attach_ebpf(fd1, 10); in test_extra_filter()
330 if (bind(fd1, addr, sockaddr_size())) in test_extra_filter()
392 int fd1, fd2, opt = 1; in test_filter_without_bind() local
395 fd1 = socket(AF_INET, SOCK_DGRAM, 0); in test_filter_without_bind()
396 if (fd1 < 0) in test_filter_without_bind()
401 if (setsockopt(fd1, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt))) in test_filter_without_bind()
[all …]
/Linux-v5.15/tools/testing/selftests/kcmp/
Dkcmp_test.c23 static long sys_kcmp(int pid1, int pid2, int type, unsigned long fd1, unsigned long fd2) in sys_kcmp() argument
25 return syscall(__NR_kcmp, pid1, pid2, type, fd1, fd2); in sys_kcmp()
37 int fd1, fd2; in main() local
42 fd1 = open(kpath, O_RDWR | O_CREAT | O_TRUNC, 0644); in main()
45 if (fd1 < 0) { in main()
102 sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd2), in main()
114 ret = sys_kcmp(pid1, pid2, KCMP_FILE, fd1, fd1); in main()
/Linux-v5.15/tools/testing/selftests/core/
Dclose_range_test.c392 int fd1, fd2, fd3, flags, ret, status; in TEST() local
400 fd1 = open("/dev/null", O_RDWR); in TEST()
401 EXPECT_GT(fd1, 0); in TEST()
403 fd2 = dup2(fd1, 1000); in TEST()
419 flags = fcntl(fd1, F_GETFD); in TEST()
427 fd3 = dup2(fd1, 42); in TEST()
449 flags = fcntl(fd1, F_GETFD); in TEST()
457 fd3 = dup2(fd1, 42); in TEST()
464 EXPECT_EQ(close(fd1), 0); in TEST()
474 int i, fd1, fd2, fd3, flags, ret, status; in TEST() local
[all …]
/Linux-v5.15/tools/perf/tests/
Dbp_signal.c32 static int fd1; variable
75 ioctl(fd1, PERF_EVENT_IOC_DISABLE, 0); in sig_handler_2()
96 ioctl(fd1, PERF_EVENT_IOC_DISABLE, 0); in sig_handler()
236 fd1 = bp_event(__test_function, SIGIO); in test__bp_signal()
240 ioctl(fd1, PERF_EVENT_IOC_ENABLE, 0); in test__bp_signal()
250 ioctl(fd1, PERF_EVENT_IOC_DISABLE, 0); in test__bp_signal()
254 count1 = bp_count(fd1); in test__bp_signal()
258 close(fd1); in test__bp_signal()
/Linux-v5.15/tools/testing/selftests/proc/
Dfd-002-posix-eq.c27 int fd0, fd1, fd2; in main() local
36 fd1 = open(buf, O_RDONLY); in main()
37 assert(fd1 >= 0); in main()
45 rv = fstat(fd1, &st1); in main()
Dproc-pid-vm.c158 int fd, fd1; in make_exe() local
205 fd1 = open(buf, O_RDONLY|O_CLOEXEC); in make_exe()
208 return fd1; in make_exe()
/Linux-v5.15/tools/testing/selftests/sync/
Dsync.c68 int sync_merge(const char *name, int fd1, int fd2) in sync_merge() argument
77 err = ioctl(fd1, SYNC_IOC_MERGE, &data); in sync_merge()
Dsync.h36 int sync_merge(const char *name, int fd1, int fd2);
/Linux-v5.15/scripts/kconfig/
Dconfdata.c44 int fd1, fd2; in is_same() local
49 fd1 = open(file1, O_RDONLY); in is_same()
50 if (fd1 < 0) in is_same()
57 ret = fstat(fd1, &st1); in is_same()
67 map1 = mmap(NULL, st1.st_size, PROT_READ, MAP_PRIVATE, fd1, 0); in is_same()
82 close(fd1); in is_same()
/Linux-v5.15/include/linux/
Daudit.h391 extern void __audit_fd_pair(int fd1, int fd2);
413 static inline void audit_fd_pair(int fd1, int fd2) in audit_fd_pair() argument
416 __audit_fd_pair(fd1, fd2); in audit_fd_pair()
619 static inline void audit_fd_pair(int fd1, int fd2) in audit_fd_pair() argument
/Linux-v5.15/tools/testing/selftests/vm/
Dhmm-tests.c66 int fd1; in FIXTURE() local
100 self->fd1 = hmm_open(1); in FIXTURE_SETUP()
101 ASSERT_GE(self->fd1, 0); in FIXTURE_SETUP()
119 ret = close(self->fd1); in FIXTURE_TEARDOWN()
121 self->fd1 = -1; in FIXTURE_TEARDOWN()
1018 ret = hmm_dmirror_cmd(self->fd1, HMM_DMIRROR_MIGRATE, buffer, npages); in TEST_F()
1026 ret = hmm_dmirror_cmd(self->fd1, HMM_DMIRROR_MIGRATE, buffer, 3); in TEST_F()
1058 ret = hmm_dmirror_cmd(self->fd1, HMM_DMIRROR_MIGRATE, buffer, 4); in TEST_F()
1321 ret = hmm_dmirror_cmd(self->fd1, HMM_DMIRROR_MIGRATE, buffer, 1); in TEST_F()
1472 ret = hmm_dmirror_cmd(self->fd1, HMM_DMIRROR_READ, buffer, npages); in TEST_F()
/Linux-v5.15/arch/nds32/include/asm/
Dnds32_fpu_inst.h49 enum fd1 { enum
/Linux-v5.15/drivers/net/wireless/ath/carl9170/
Dphy.c970 u32 d0, d1, td0, td1, fd0, fd1; in carl9170_init_rf_bank4_pwr() local
1019 fd1 = td1 << 5 | td0; in carl9170_init_rf_bank4_pwr()
1024 carl9170_regwrite(0x1c58e8, fd1); in carl9170_init_rf_bank4_pwr()
/Linux-v5.15/net/
Dsocket.c1576 int fd1, fd2, err; in __sys_socketpair() local
1592 fd1 = get_unused_fd_flags(flags); in __sys_socketpair()
1593 if (unlikely(fd1 < 0)) in __sys_socketpair()
1594 return fd1; in __sys_socketpair()
1598 put_unused_fd(fd1); in __sys_socketpair()
1602 err = put_user(fd1, &usockvec[0]); in __sys_socketpair()
1653 audit_fd_pair(fd1, fd2); in __sys_socketpair()
1655 fd_install(fd1, newfile1); in __sys_socketpair()
1661 put_unused_fd(fd1); in __sys_socketpair()
/Linux-v5.15/drivers/net/
Dgtp.c862 u32 fd1 = nla_get_u32(data[IFLA_GTP_FD1]); in gtp_encap_enable() local
864 sk1u = gtp_encap_enable_socket(fd1, UDP_ENCAP_GTP1U, gtp); in gtp_encap_enable()
/Linux-v5.15/tools/testing/selftests/seccomp/
Dseccomp_bpf.c291 static int __filecmp(pid_t pid1, pid_t pid2, int fd1, int fd2) in __filecmp() argument
295 return syscall(__NR_kcmp, pid1, pid2, KCMP_FILE, fd1, fd2); in __filecmp()
303 #define filecmp(pid1, pid2, fd1, fd2) ({ \ argument
306 _ret = __filecmp(pid1, pid2, fd1, fd2); \
/Linux-v5.15/kernel/
Dauditsc.c2378 void __audit_fd_pair(int fd1, int fd2) in __audit_fd_pair() argument
2382 context->fds[0] = fd1; in __audit_fd_pair()
/Linux-v5.15/Documentation/powerpc/
Dcxlflash.rst144 (herein referred to as fd1) that should be used for issuing the
/Linux-v5.15/Documentation/m68k/
Dkernel-options.rst96 /dev/fd0 stands for the first drive, /dev/fd1 for the second, and so
/Linux-v5.15/Documentation/admin-guide/
Ddevices.txt51 1 = /dev/fd1 Controller 0, drive 1, autodetect