/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/ |
H A D | clonefile.c | 71 cf_copy_file_range(int sfd, loff_t *soff, int dfd, loff_t *doff, in cf_copy_file_range() argument 75 return (copy_file_range(sfd, soff, dfd, doff, len, flags)); in cf_copy_file_range() 77 syscall(__NR_copy_file_range, sfd, soff, dfd, doff, len, flags)); in cf_copy_file_range() 153 int do_clone(int sfd, int dfd); 154 int do_clonerange(int sfd, int dfd, loff_t soff, loff_t doff, size_t len); 155 int do_copyfilerange(int sfd, int dfd, loff_t soff, loff_t doff, size_t len); 156 int do_deduperange(int sfd, int dfd, loff_t soff, loff_t doff, size_t len); 231 int sfd = open(argv[optind], O_RDONLY); in main() local 232 if (sfd < 0) { in main() 243 close(sfd); in main() [all …]
|
H A D | clone_mmap_write.c | 65 clone_file(int sfd, long long size, const char *dest) in clone_file() argument 74 if (copy_file_range(sfd, 0, dfd, 0, size, 0) < 0) { in clone_file() 106 int sfd, dfd; in main() local 114 sfd = open_file(argv[1]); in main() 115 if (fstat(sfd, &sb) == -1) { in main() 119 dfd = clone_file(sfd, sb.st_size, argv[2]); in main()
|
H A D | clone_mmap_cached.c | 75 int dfd, sfd; in main() local 106 sfd = open(argv[0], O_RDONLY); in main() 107 if (fstat(sfd, &sb) == -1) { in main() 112 smem = mmap_file(sfd, ssize); in main() 139 if (copy_file_range(sfd, &soff, dfd, &doff, ssize, 0) < 0) { in main()
|
/freebsd/tools/test/stress2/misc/ |
H A D | sndstat.sh | 70 int sfd, i, n; 75 if ((sfd = open(path, O_RDONLY)) == -1) 78 read(sfd, buf, sizeof(buf)); 82 close(sfd); 85 if ((sfd = open(path, O_RDONLY)) == -1) 87 if (sfd > 0) 88 close(sfd);
|
H A D | mapwrite.sh | 115 _clone_file(int sfd) 123 if (copy_file_range(sfd, 0, dfd, 0, DATASIZE * NDATA, 0) < 0) { 155 int sfd = _create_file(); 156 int dfd = _clone_file(sfd);
|
/freebsd/contrib/blocklist/test/ |
H A D | srvtest.c | 104 int sfd; in cr() local 107 sfd = socket(af == AF_INET ? PF_INET : PF_INET6, type, 0); in cr() 108 if (sfd == -1) in cr() 128 if (bind(sfd, (const void *)&ss, slen) == -1) in cr() 132 if (listen(sfd, 5) == -1) in cr() 134 return sfd; in cr() 138 handle(int type, int sfd) in handle() argument 145 if ((afd = accept(sfd, (void *)&ss, &alen)) == -1) in handle() 148 afd = sfd; in handle()
|
H A D | cltest.c | 93 int sfd; in main() local 124 if ((sfd = socket(AF_INET, type, 0)) == -1) in main() 129 if (connect(sfd, (const void *)&ss, slen) == -1) in main() 133 if (write(sfd, msg, len) != (ssize_t)len) in main()
|
/freebsd/sbin/ggate/ggatec/ |
H A D | ggatec.c | 296 int sfd; in handshake() local 309 sfd = socket(AF_INET, SOCK_STREAM, 0); in handshake() 310 if (sfd == -1) { in handshake() 316 g_gate_socket_settings(sfd); in handshake() 318 if (connect(sfd, (struct sockaddr *)&serv, sizeof(serv)) == -1) { in handshake() 321 close(sfd); in handshake() 336 if (g_gate_send(sfd, &ver, sizeof(ver), MSG_NOSIGNAL) == -1) { in handshake() 339 close(sfd); in handshake() 343 if (g_gate_recv(sfd, &ver, sizeof(ver), MSG_WAITALL) == -1) { in handshake() 346 close(sfd); in handshake() [all …]
|
/freebsd/sbin/ggate/ggated/ |
H A D | ggated.c | 501 connection_new(struct g_gate_cinit *cinit, struct sockaddr *s, int sfd) in connection_new() argument 527 conn->c_sendfd = sfd; in connection_new() 529 conn->c_recvfd = sfd; in connection_new() 542 struct sockaddr *s, int sfd) in connection_add() argument 554 conn->c_sendfd = sfd; in connection_add() 562 conn->c_recvfd = sfd; in connection_add() 657 sendfail(int sfd, int error, const char *fmt, ...) in sendfail() argument 666 data = g_gate_send(sfd, &sinit, sizeof(sinit), 0); in sendfail() 917 handshake(struct sockaddr *from, int sfd) in handshake() argument 931 data = g_gate_recv(sfd, &ver, sizeof(ver), MSG_WAITALL); in handshake() [all …]
|
/freebsd/contrib/ofed/librdmacm/ |
H A D | preload.c | 447 static int copysockopts(int dfd, int sfd, struct socket_calls *dapi, in copysockopts() argument 453 ret = sapi->fcntl(sfd, F_GETFL); in copysockopts() 460 ret = sapi->getsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, ¶m, &len); in copysockopts() 467 ret = sapi->getsockopt(sfd, IPPROTO_TCP, TCP_NODELAY, ¶m, &len); in copysockopts() 482 int sfd, dfd, param, ret; in transpose_socket() local 485 sfd = fd_getd(socket); in transpose_socket() 494 ret = sapi->getsockname(sfd, NULL, &len); in transpose_socket() 503 ret = copysockopts(dfd, sfd, dapi, sapi); in transpose_socket() 630 int sfd, dfd, ret; in fork_active() local 635 sfd = fd_getd(socket); in fork_active() [all …]
|
/freebsd/crypto/openssl/engines/ |
H A D | e_afalg.c | 75 static int afalg_fin_cipher_aio(afalg_aio *ptr, int sfd, 264 static int afalg_fin_cipher_aio(afalg_aio *aio, int sfd, unsigned char *buf, in afalg_fin_cipher_aio() argument 287 cb->aio_fildes = sfd; in afalg_fin_cipher_aio() 424 actx->bfd = actx->sfd = -1; in afalg_create_sk() 445 actx->sfd = accept(actx->bfd, NULL, 0); in afalg_create_sk() 446 if (actx->sfd < 0) { in afalg_create_sk() 457 if (actx->sfd >= 0) in afalg_create_sk() 458 close(actx->sfd); in afalg_create_sk() 459 actx->bfd = actx->sfd = -1; in afalg_create_sk() 508 sbytes = sendmsg(actx->sfd, in afalg_start_cipher_sk() [all...] |
/freebsd/sbin/ipf/ipsend/ |
H A D | arp.c | 61 static int sfd = -1; local 89 if (sfd == -1) 90 if ((sfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) 96 if (ioctl(sfd, SIOCGARP, (caddr_t)&ar) == -1)
|
/freebsd/sbin/ggate/shared/ |
H A D | ggate.c | 276 g_gate_socket_settings(int sfd) in g_gate_socket_settings() argument 284 if (setsockopt(sfd, IPPROTO_TCP, TCP_NODELAY, &on, in g_gate_socket_settings() 289 if (setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) in g_gate_socket_settings() 292 if (setsockopt(sfd, SOL_SOCKET, SO_RCVBUF, &bsize, sizeof(bsize)) == -1) in g_gate_socket_settings() 295 if (setsockopt(sfd, SOL_SOCKET, SO_SNDBUF, &bsize, sizeof(bsize)) == -1) in g_gate_socket_settings() 299 if (setsockopt(sfd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)) == -1) { in g_gate_socket_settings() 303 if (setsockopt(sfd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) == -1) { in g_gate_socket_settings()
|
/freebsd/crypto/heimdal/kadmin/ |
H A D | kadmind.c | 97 krb5_socket_t sfd = rk_INVALID_SOCKET; in main() local 175 mini_inetd(debug_port, &sfd); in main() 196 sfd = STDIN_FILENO; in main() 202 kadmind_loop(context, keytab, sfd); in main()
|
/freebsd/sbin/swapon/ |
H A D | swapon.c | 412 FILE *sfd; in swap_on_geli_args() 421 sfd = NULL; in swap_on_geli_args() 471 sfd = fdopen(fd, "r"); in swap_on_off_md() 472 if (sfd == NULL) { in swap_on_off_md() local 477 p = fgetln(sfd, &linelen); in swap_on_off_md() 532 sfd = fdopen(fd, "r"); in swap_on_off_md() 533 if (sfd == NULL) { in swap_on_off_md() 538 p = fgetln(sfd, &linelen); in swap_on_off_md() 591 if (sfd != NULL) in swap_on_off_md() 592 fclose(sfd); in swap_on_off_md() [all...] |
/freebsd/crypto/openssl/test/helpers/ |
H A D | ssltestlib.h | 24 SSL **cssl, int sfd, int cfd); 25 int create_test_sockets(int *cfd, int *sfd);
|
H A D | ssltestlib.c | 919 int afd = -1, cfd = -1, sfd = -1; in create_test_sockets() 945 while (sfd == -1 || !cfd_connected ) { in create_test_sockets() 946 sfd = accept(afd, NULL, 0); in create_test_sockets() 947 if (sfd == -1 && errno != EAGAIN) in create_test_sockets() 956 if (set_nb(cfd) == -1 || set_nb(sfd) == -1) in create_test_sockets() 960 *sfdp = sfd; in create_test_sockets() 966 if (sfd != -1) in create_ssl_objects2() argument 967 close(sfd); in create_ssl_objects2() 975 SSL **cssl, int sfd, int cfd) in create_ssl_objects2() 989 if (!TEST_ptr(s_to_c_bio = BIO_new_socket(sfd, BIO_NOCLOS in create_ssl_objects2() 910 int afd = -1, cfd = -1, sfd = -1; create_test_sockets() local [all...] |
/freebsd/sbin/ipf/ipfs/ |
H A D | ipfs.c | 422 int sfd = -1, i; in readstate() local 428 sfd = open(file, O_RDONLY, 0600); in readstate() 429 if (sfd == -1) { in readstate() 441 i = read(sfd, &ips, sizeof(ips)); in readstate() 488 close(sfd); in readstate() 528 if (sfd != -1) in readstate() 529 close(sfd); in readstate()
|
/freebsd/sys/contrib/device-tree/Bindings/net/ieee802154/ |
H A D | cc2520.txt | 12 - sfd-gpio: GPIO spec for the SFD pin 29 sfd-gpio = <&gpio1 13 0>;
|
/freebsd/usr.sbin/bhyve/ |
H A D | rfb.c | 114 int sfd; member 1226 cfd = accept(rc->sfd, NULL, NULL); in rfb_thr() 1275 rc->sfd = -1; in rfb_init() 1304 rc->sfd = socket(ai->ai_family, ai->ai_socktype, 0); in rfb_init() 1305 if (rc->sfd < 0) { in rfb_init() 1310 setsockopt(rc->sfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); in rfb_init() 1312 if (bind(rc->sfd, ai->ai_addr, ai->ai_addrlen) < 0) { in rfb_init() 1317 if (listen(rc->sfd, 1) < 0) { in rfb_init() 1324 if (caph_rights_limit(rc->sfd, &rights) == -1) in rfb_init() 1356 if (rc->sfd != -1) in rfb_init() [all …]
|
/freebsd/sbin/mdmfs/ |
H A D | mdmfs.c | 462 FILE *sfd; in do_mdconfig_attach_au() local 491 sfd = fdopen(fd, "r"); in do_mdconfig_attach_au() 492 if (sfd == NULL) in do_mdconfig_attach_au() 494 linep = fgetln(sfd, &linelen); in do_mdconfig_attach_au() 510 fclose(sfd); in do_mdconfig_attach_au()
|
/freebsd/contrib/netbsd-tests/lib/libc/ttyio/ |
H A D | t_ptm.c | 91 REQUIRE_ERRNO(fstat(ptm.sfd, &stm), -1); in ATF_TC_BODY() 101 (void)close(ptm.sfd); in ATF_TC_BODY()
|
/freebsd/usr.sbin/lpr/lpd/ |
H A D | printjob.c | 996 int copycnt, filtstat, narg, resp, sfd, sfres, sizerr, statrc; in sendfile() local 1007 sfd = open(file, O_RDONLY); in sendfile() 1008 if (sfd < 0) { in sendfile() 1018 if ((stb.st_mode & S_IFMT) == S_IFLNK && fstat(sfd, &stb) == 0 && in sendfile() 1020 close(sfd); in sendfile() 1094 filtstat = execfilter(pp, filtcmd, av, sfd, tfd); in sendfile() 1121 close(sfd); in sendfile() 1122 sfd = tfd; in sendfile() 1123 lseek(sfd, 0, SEEK_SET); in sendfile() 1164 if (sizerr == 0 && read(sfd, buf, amt) != amt) in sendfile() [all …]
|
/freebsd/tests/sys/kern/ |
H A D | ktrace_test.c | 375 int error, sfd; in ATF_TC_BODY() local 381 CHILD_REQUIRE((sfd = socket(AF_INET, SOCK_DGRAM, in ATF_TC_BODY() 386 CHILD_REQUIRE(bind(sfd, (const struct sockaddr *)&addr, in ATF_TC_BODY() 399 CHILD_REQUIRE(sendto(sfd, NULL, 0, 0, in ATF_TC_BODY() 413 close(sfd); in ATF_TC_BODY()
|
/freebsd/sys/contrib/openzfs/module/os/linux/zfs/ |
H A D | zpl_file_range.c | 219 unsigned long sfd = (unsigned long)arg; in zpl_ioctl_ficlone() local 221 struct file *src_file = fget(sfd); in zpl_ioctl_ficlone()
|