| /freebsd-14.2/tools/regression/capsicum/syscalls/ |
| H A D | cap_fcntls_limit.c | 53 CHECK(fcntl(fd, F_GETFD) == 0); in fcntl_tests_0() 57 CHECK(fcntl(fd, F_GETFD) == 0); in fcntl_tests_0() 77 CHECK(fcntl(fd, F_GETFD) == 0); in fcntl_tests_0() 81 CHECK(fcntl(fd, F_GETFD) == 0); in fcntl_tests_0() 100 CHECK(fcntl(fd, F_GETFD) == 0); in fcntl_tests_0() 104 CHECK(fcntl(fd, F_GETFD) == 0); in fcntl_tests_0() 133 CHECK(fcntl(fd, F_GETFD) == 0); in fcntl_tests_0() 137 CHECK(fcntl(fd, F_GETFD) == 0); in fcntl_tests_0() 185 CHECK(fcntl(fd, F_GETFD) == 0); in fcntl_tests_1() 189 CHECK(fcntl(fd, F_GETFD) == 0); in fcntl_tests_1() [all …]
|
| H A D | cap_ioctls_limit.c | 53 CHECK(fcntl(fd, F_GETFD) == 0); in ioctl_tests_0() 57 CHECK(fcntl(fd, F_GETFD) == 0); in ioctl_tests_0() 74 CHECK(fcntl(fd, F_GETFD) == 0); in ioctl_tests_0() 78 CHECK(fcntl(fd, F_GETFD) == 0); in ioctl_tests_0() 94 CHECK(fcntl(fd, F_GETFD) == 0); in ioctl_tests_0() 102 CHECK(fcntl(fd, F_GETFD) == 0); in ioctl_tests_0() 112 CHECK(fcntl(fd, F_GETFD) == 0); in ioctl_tests_0() 116 CHECK(fcntl(fd, F_GETFD) == 0); in ioctl_tests_0() 124 CHECK(fcntl(fd, F_GETFD) == 0); in ioctl_tests_0() 158 CHECK(fcntl(fd, F_GETFD) == 0); in ioctl_tests_1() [all …]
|
| /freebsd-14.2/tests/sys/file/ |
| H A D | dup_test.c | 93 if (fcntl(fd1, F_SETFD, 1) != 0) in main() 111 if (fcntl(fd2, F_GETFD) != 0) in main() 158 if (fcntl(fd2, F_GETFD) == 0) in main() 164 if ((fd2 = fcntl(fd1, F_DUPFD, 10)) < 0) in main() 174 if (fcntl(fd2, F_GETFD) != 0) in main() 206 if (fcntl(fd2, F_GETFD) != 0) in main() 232 if (fcntl(fd2, F_GETFD) == 0) in main() 260 if (fcntl(fd2, F_GETFD) != 1) in main() 285 if (fcntl(fd2, F_GETFD) != FD_CLOEXEC) in main() 325 if (fcntl(fd2, F_GETFD) != FD_CLOEXEC) in main() [all …]
|
| H A D | flock_helper.c | 156 if (fcntl(fd, F_GETLK, &fl1) < 0) in test1() 229 res = fcntl(fd, F_SETLK, &fl); in test2() 303 res = fcntl(fd, F_SETLKW, &fl); in test3() 460 res = fcntl(fd, F_SETLKW, &fl); in test5() 564 res = fcntl(fd, F_SETLKW, &fl); in test6() 646 res = fcntl(fd, F_SETLK, &fl); in test7() 718 res = fcntl(fd, F_SETLK, &fl); in test8() 795 res = fcntl(fd, F_SETLK, &fl); in test9() 914 res = fcntl(fd, F_GETLK, &fl); in test11() 945 res = fcntl(fd, F_GETLK, &fl); in test11() [all …]
|
| H A D | fcntlflags_test.c | 53 flags1 = fcntl(fd, F_GETFL); in subtests() 63 if (fcntl(fd, F_SETFL, flags1) == -1) in subtests() 69 flags2 = fcntl(fd, F_GETFL); in subtests() 79 if (fcntl(fd, F_SETFL, flags2 | O_NONBLOCK) == -1) in subtests() 85 flags3 = fcntl(fd, F_GETFL); in subtests()
|
| /freebsd-14.2/contrib/capsicum-test/ |
| H A D | fcntl.cc | 171 int newfd = fcntl(caps[0], F_DUPFD, 0); in TEST() 187 EXPECT_OK(fcntl(caps[0], F_GETFD, 0)); in TEST() 188 EXPECT_OK(fcntl(caps[0], F_SETFD, 0)); in TEST() 268 int fd_flag = fcntl(fd, F_GETFL, 0); in TEST() 331 int fd_flag = fcntl(fd, F_GETFL, 0); in TEST() 333 EXPECT_OK(fcntl(fd, F_SETFL, fd_flag)); in TEST() 337 fd_flag = fcntl(fd, F_GETFL, 0); in TEST() 347 fd_flag = fcntl(fd_get, F_GETFL, 0); in TEST() 372 int owner = fcntl(sock, F_GETOWN, 0); in TEST() 378 owner = fcntl(sock, F_GETOWN, 0); in TEST() [all …]
|
| /freebsd-14.2/tests/sys/posixshm/ |
| H A D | memfd_test.c | 73 ATF_REQUIRE((fcntl(fd_cl, F_GETFD) & FD_CLOEXEC) != 0); in ATF_TC_BODY() 85 ATF_REQUIRE(fcntl(fd, F_GET_SEALS) == F_SEAL_SEAL); in ATF_TC_BODY() 86 ATF_REQUIRE(fcntl(fd, F_ADD_SEALS, F_SEAL_WRITE) == -1); in ATF_TC_BODY() 111 ATF_REQUIRE(fcntl(fd, F_ADD_SEALS, F_SEAL_WRITE) == 0); in ATF_TC_BODY() 155 ATF_REQUIRE(fcntl(fd, F_ADD_SEALS, F_SEAL_WRITE) == 0); in ATF_TC_BODY() 181 ATF_REQUIRE(fcntl(fd, F_ADD_SEALS, seals) == 0); in memfd_truncate_test() 214 ATF_REQUIRE(fcntl(fd, F_GET_SEALS) == 0); in ATF_TC_BODY() 217 seals = fcntl(fd, F_GET_SEALS); in ATF_TC_BODY() 232 ATF_REQUIRE(fcntl(fd, F_GET_SEALS) == 0); in ATF_TC_BODY() 235 seals = fcntl(fd, F_GET_SEALS); in ATF_TC_BODY() [all …]
|
| /freebsd-14.2/contrib/netbsd-tests/lib/libc/sys/ |
| H A D | t_pipe2.c | 71 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) != 0); in run() 72 ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) != 0); in run() 74 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) == 0); in run() 75 ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) == 0); in run() 79 ATF_REQUIRE((fcntl(fd[0], F_GETFL) & O_NONBLOCK) != 0); in run() 80 ATF_REQUIRE((fcntl(fd[1], F_GETFL) & O_NONBLOCK) != 0); in run() 82 ATF_REQUIRE((fcntl(fd[0], F_GETFL) & O_NONBLOCK) == 0); in run() 88 ATF_REQUIRE(fcntl(fd[0], F_GETNOSIGPIPE) != 0); in run() 89 ATF_REQUIRE(fcntl(fd[1], F_GETNOSIGPIPE) != 0); in run() 91 ATF_REQUIRE(fcntl(fd[0], F_GETNOSIGPIPE) == 0); in run() [all …]
|
| H A D | t_socketpair.c | 83 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) != 0); in run() 84 ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) != 0); in run() 86 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) == 0); in run() 87 ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) == 0); in run() 91 ATF_REQUIRE((fcntl(fd[0], F_GETFL) & O_NONBLOCK) != 0); in run() 92 ATF_REQUIRE((fcntl(fd[1], F_GETFL) & O_NONBLOCK) != 0); in run() 94 ATF_REQUIRE((fcntl(fd[0], F_GETFL) & O_NONBLOCK) == 0); in run() 95 ATF_REQUIRE((fcntl(fd[1], F_GETFL) & O_NONBLOCK) == 0); in run()
|
| /freebsd-14.2/tools/test/stress2/misc/ |
| H A D | fcntl.sh | 35 sed '1,/^EOF/d' < $here/$0 > fcntl.c 36 mycc -o fcntl -Wall -Wextra -O0 -g fcntl.c || exit 1 37 rm -f fcntl.c 41 /tmp/fcntl 44 rm -f /tmp/fcntl 93 while (fcntl(fd, F_SETLK, &fl) < 0) { 124 if (fcntl(fd, F_SETLK, &fl) < 0) 138 if ((flags = fcntl(fd, F_GETFL)) == -1) 141 if ((flags = fcntl(fd, F_SETFL, flags)) == -1) 162 if ((flags = fcntl(fd, F_GETFL)) == -1) [all …]
|
| /freebsd-14.2/contrib/netbsd-tests/lib/libc/gen/ |
| H A D | t_closefrom.c | 59 cur1 = fcntl(0, F_MAXFD); in ATF_TC_BODY() 64 cur2 = fcntl(0, F_MAXFD); in ATF_TC_BODY() 93 cur = fcntl(0, F_MAXFD); in ATF_TC_BODY() 101 cur = fcntl(0, F_MAXFD); in ATF_TC_BODY() 107 cur = fcntl(0, F_MAXFD); in ATF_TC_BODY() 151 _exit(fcntl(0, F_MAXFD)); in ATF_TC_BODY()
|
| /freebsd-14.2/contrib/llvm-project/llvm/lib/Support/ |
| H A D | AutoConvert.cpp | 31 return fcntl(FD, F_CONTROL_CVT, &Convert); in disableAutoConversion() 43 return (fcntl(FD, F_CONTROL_CVT, &Cvt)); in restoreStdHandleAutoConversion() 53 if (fcntl(FD, F_CONTROL_CVT, &Query) == -1) in enableAutoConversion() 80 return fcntl(FD, F_CONTROL_CVT, &Query); in enableAutoConversion() 113 if (fcntl(FD, F_SETTAG, &Tag) == -1) in setFileTag()
|
| /freebsd-14.2/tools/regression/sockets/accept_fd_leak/ |
| H A D | accept_fd_leak.c | 108 i = fcntl(s, F_GETFL); in main() 112 if (fcntl(s, F_SETFL, i) != 0) in main() 114 i = fcntl(s, F_GETFL); in main() 175 i = fcntl(s, F_GETFL); in main() 179 if (fcntl(s, F_SETFL, i) != 0) in main() 181 i = fcntl(s, F_GETFL); in main()
|
| /freebsd-14.2/tools/regression/sockets/kqueue/ |
| H A D | kqueue.c | 270 if (fcntl(sv[0], F_SETFL, O_NONBLOCK) != 0) in main() 273 if (fcntl(sv[1], F_SETFL, O_NONBLOCK) != 0) in main() 300 if (fcntl(sv[0], F_SETFL, O_NONBLOCK) != 0) in main() 302 if (fcntl(sv[1], F_SETFL, O_NONBLOCK) != 0) in main() 321 if (fcntl(sv[0], F_SETFL, O_NONBLOCK) != 0) in main() 324 if (fcntl(sv[1], F_SETFL, O_NONBLOCK) != 0) in main() 345 if (fcntl(sv[0], F_SETFL, O_NONBLOCK) != 0) in main() 348 if (fcntl(sv[1], F_SETFL, O_NONBLOCK) != 0) in main()
|
| /freebsd-14.2/contrib/blocklist/port/ |
| H A D | popenve.c | 96 fcntl(pdes[0], F_SETFD, FD_CLOEXEC); in pdes_get() 97 fcntl(pdes[1], F_SETFD, FD_CLOEXEC); in pdes_get() 107 fcntl(pdes[0], F_SETFL, fcntl(pdes[0], F_GETFL) | flags); in pdes_get() 108 fcntl(pdes[1], F_SETFL, fcntl(pdes[1], F_GETFL) | flags); in pdes_get()
|
| /freebsd-14.2/tools/regression/netinet/tcpfullwindowrst/ |
| H A D | tcpfullwindowrsttest.c | 95 fcntl(t, F_SETFL, fcntl(t, F_GETFL) | O_NONBLOCK); in main() 96 fcntl(u, F_SETFL, fcntl(t, F_GETFL) | O_NONBLOCK); in main()
|
| /freebsd-14.2/contrib/ntp/libntp/ |
| H A D | socket.c | 102 newfd = fcntl(fd, F_DUPFD, socket_boundary); in move_fd() 146 if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) { in make_socket_nonblocking() 152 if (fcntl(fd, F_SETFL, FNDELAY) < 0) { in make_socket_nonblocking() 158 if (fcntl(fd, F_SETFL, O_NDELAY) < 0) { in make_socket_nonblocking()
|
| H A D | iosignal.c | 155 if (fcntl(rio->fd, F_SETFL, FNDELAY|FASYNC) < 0) in init_clock_sig() 183 if (fcntl(rio->fd, F_SETOWN, getpid()) == -1) in init_clock_sig() 189 if (fcntl(rio->fd, F_SETFL, FNDELAY|FASYNC) < 0) in init_clock_sig() 235 if ((flags = fcntl(fd, F_GETFL, 0)) == -1) in init_socket_sig() 241 if (fcntl(fd, F_SETFL, flags|FASYNC) < 0) in init_socket_sig() 273 if (fcntl(fd, F_SETOWN, pgrp) == -1) in init_socket_sig()
|
| /freebsd-14.2/contrib/netbsd-tests/net/net/ |
| H A D | t_tcp.c | 121 fl = fcntl(srvr, F_GETFL, 0); in paccept_block() 125 ok = fcntl(srvr, F_SETFL, fl & ~O_NONBLOCK); in paccept_block() 136 fl = fcntl(as, F_GETFL, 0); in paccept_block() 141 ok = fcntl(as, F_SETFL, fl & ~O_NONBLOCK); in paccept_block() 145 fl = fcntl(as, F_GETFL, 0); in paccept_block()
|
| /freebsd-14.2/tools/regression/security/cap_test/ |
| H A D | cap_test_fcntl.c | 105 CHECK_SYSCALL_SUCCEEDS(fcntl, f.f_fd, F_GETFL, 0); in test_fcntl() 107 if (fcntl(f.f_fd, F_GETFL, 0) == -1) in test_fcntl() 110 CHECK_NOTCAPABLE(fcntl, cap, F_GETFL, 0); in test_fcntl()
|
| /freebsd-14.2/sys/contrib/openzfs/cmd/zed/ |
| H A D | zed_file.c | 45 if (fcntl(fd, F_SETLK, &lock) < 0) { in zed_file_lock() 72 if (fcntl(fd, F_SETLK, &lock) < 0) in zed_file_unlock() 98 if (fcntl(fd, F_GETLK, &lock) < 0) in zed_file_is_locked()
|
| /freebsd-14.2/tests/sys/fs/fusefs/ |
| H A D | locks.cc | 233 ASSERT_NE(-1, fcntl(fd, F_GETLK, &fl)) << strerror(errno); in TEST_F() 283 ASSERT_NE(-1, fcntl(fd, F_GETLK, &fl)) << strerror(errno); in TEST_F() 346 ASSERT_NE(-1, fcntl(fd, F_GETLK, &fl)) << strerror(errno); in TEST_F() 405 ASSERT_NE(-1, fcntl(fd, F_GETLK, &fl)) << strerror(errno); in TEST_F() 470 ASSERT_NE(-1, fcntl(fd, F_GETLK, &fl)) << strerror(errno); in TEST_F() 509 ASSERT_NE(-1, fcntl(fd, F_SETLK, &fl)) << strerror(errno); in TEST_F() 535 ASSERT_NE(-1, fcntl(fd, F_SETLK, &fl)) << strerror(errno); in TEST_F() 561 ASSERT_NE(-1, fcntl(fd, F_SETLK, &fl)) << strerror(errno); in TEST_F() 587 ASSERT_NE(-1, fcntl(fd, F_SETLK, &fl)) << strerror(errno); in TEST_F() 615 ASSERT_NE(-1, fcntl(fd, F_SETLK, &fl)) << strerror(errno); in TEST_F() [all …]
|
| /freebsd-14.2/crypto/heimdal/lib/roken/ |
| H A D | flock.c | 62 code = fcntl(fd, F_SETLK, &arg); in rk_flock() 66 code = fcntl(fd, cmd, &arg); in rk_flock() 70 code = fcntl(fd, cmd, &arg); in rk_flock()
|
| /freebsd-14.2/usr.sbin/ppp/ |
| H A D | prompt.c | 423 stat = fcntl(fd, F_GETFL, 0); in prompt_TtyInit() 426 fcntl(fd, F_SETFL, stat); in prompt_TtyInit() 462 stat = fcntl(p->fd_in, F_GETFL, 0); in prompt_TtyCommandMode() 465 fcntl(p->fd_in, F_SETFL, stat); in prompt_TtyCommandMode() 482 stat = fcntl(p->fd_in, F_GETFL, 0); in prompt_TtyTermMode() 485 fcntl(p->fd_in, F_SETFL, stat); in prompt_TtyTermMode() 495 stat = fcntl(p->fd_in, F_GETFL, 0); in prompt_TtyOldMode() 498 fcntl(p->fd_in, F_SETFL, stat); in prompt_TtyOldMode()
|
| /freebsd-14.2/lib/libc/sys/ |
| H A D | fcntl.c | 41 #pragma weak fcntl macro 43 fcntl(int fd, int cmd, ...) in fcntl() function
|