/freebsd-11-stable/tests/sys/file/ |
H A D | dup_test.c | 83 int orgfd, fd1, fd2, test = 0; local 90 if ((fd1 = dup(orgfd)) < 0) 95 if (fcntl(fd1, F_SETFD, 1) != 0) 99 if ((fd2 = dup2(fd1, fd1 + 1)) < 0) 105 if (fd2 != fd1 + 1) 145 if ((fd2 = dup2(fd1, fd1)) < 0) 151 if (fd2 != fd1) 166 if ((fd2 = fcntl(fd1, F_DUPF [all...] |
/freebsd-11-stable/contrib/gcclibs/libiberty/ |
H A D | fdmatch.c | 23 @deftypefn Extension int fdmatch (int @var{fd1}, int @var{fd2}) 52 int fdmatch (int fd1, int fd2) argument 57 if ((fstat (fd1, &sbuf1) == 0) &&
|
/freebsd-11-stable/contrib/binutils/libiberty/ |
H A D | fdmatch.c | 23 @deftypefn Extension int fdmatch (int @var{fd1}, int @var{fd2}) 52 int fdmatch (int fd1, int fd2) argument 57 if ((fstat (fd1, &sbuf1) == 0) &&
|
/freebsd-11-stable/contrib/netbsd-tests/kernel/kqueue/read/ |
H A D | t_file2.c | 56 int fd1, fd2, kq; local 59 RL(fd1 = open("afile", O_RDONLY|O_CREAT, 0644)); 63 RL(lseek(fd1, 0, SEEK_END)); 68 EV_SET(&event[0], fd1, EVFILT_READ, EV_ADD|EV_ENABLE, 0, 0, 0); 71 RL(dup2(fd2, fd1));
|
/freebsd-11-stable/lib/libutil/tests/ |
H A D | flopen_test.c | 99 int fd1, fd2; local 102 fd1 = flopen(fn, O_RDWR|O_CREAT, 0640); 103 if (fd1 < 0) { 111 close(fd1); 125 volatile int fd1, fd2; local 128 fd1 = flopen(fn, O_RDWR|O_CREAT, 0640); 129 if (fd1 < 0) { 142 close(fd1); 157 volatile int fd1, fd2; local 160 fd1 [all...] |
/freebsd-11-stable/usr.sbin/boot98cfg/ |
H A D | boot98cfg.c | 101 int fd1; local 162 fd1 = open(iplbakpath, O_WRONLY | O_CREAT | O_TRUNC, 0666); 163 if (fd1 < 0) 165 n = write(fd1, boot0buf, IPLSIZE); 170 close(fd1); 174 fd1 = open(menubakpath, O_WRONLY | O_CREAT | O_TRUNC, 0666); 175 if (fd1 < 0) 177 n = write(fd1, boot0buf + BOOTMENUOFF, BOOTMENUSIZE); 182 close(fd1); 187 fd1 [all...] |
/freebsd-11-stable/usr.bin/cmp/ |
H A D | cmp.c | 76 int ch, fd1, fd2, oflag, special; local 116 fd1 = 0; 119 else if ((fd1 = open(file1, oflag, 0)) < 0 && errno != EMLINK) { 143 if (fd1 == -1) { 159 if (fstat(fd1, &sb1)) { 180 c_special(fd1, file1, skip1, fd2, file2, skip2); 188 c_regular(fd1, file1, skip1, sb1.st_size,
|
H A D | special.c | 48 c_special(int fd1, const char *file1, off_t skip1, argument 56 if ((fp1 = fdopen(fd1, "r")) == NULL)
|
H A D | regular.c | 59 c_regular(int fd1, const char *file1, off_t skip1, off_t len1, argument 92 if ((m1 = remmap(NULL, fd1, off1)) == NULL) { 93 c_special(fd1, file1, skip1, fd2, file2, skip2); 99 c_special(fd1, file1, skip1, fd2, file2, skip2); 127 if ((p1 = m1 = remmap(m1, fd1, off1)) == NULL) {
|
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/sys/ |
H A D | t_dup.c | 60 int fd, fd1, fd2; local 71 fd1 = open(path, mode[i] | O_CREAT, perm[j]); 74 ATF_REQUIRE(fd1 >= 0); 78 fd = dup(fd1); 80 fd = dup2(fd1, fd2); 82 fd = dup3(fd1, fd2, O_CLOEXEC); 93 ATF_REQUIRE(fstat(fd1, &st1) == 0); 99 (void)close(fd1); 114 int fd, fd1, fd2; local 116 fd1 [all...] |
/freebsd-11-stable/tools/regression/sockets/unix_cmsg/ |
H A D | t_cmsgcred_sockcred.c | 44 t_cmsgcred_sockcred_server(int fd1) argument 68 if (setsockopt(fd1, 0, LOCAL_CREDS, &val, sizeof(val)) < 0) { 77 fd2 = uc_socket_accept(fd1); 81 fd2 = fd1;
|
H A D | t_cmsg_len.c | 106 t_cmsg_len_server(int fd1) argument 116 fd2 = uc_socket_accept(fd1); 120 fd2 = fd1;
|
H A D | t_cmsgcred.c | 78 t_cmsgcred_server(int fd1) argument 102 fd2 = uc_socket_accept(fd1); 106 fd2 = fd1;
|
H A D | t_sockcred.c | 72 t_sockcred_server(int type, int fd1) argument 95 if (setsockopt(fd1, 0, LOCAL_CREDS, &val, sizeof(val)) < 0) { 105 fd2 = uc_socket_accept(fd1); 109 fd2 = fd1;
|
H A D | t_peercred.c | 117 t_peercred_server(int fd1) argument 126 fd2 = uc_socket_accept(fd1);
|
/freebsd-11-stable/tests/sys/kern/ |
H A D | kern_descrip_test.c | 54 int fd1, fd2; local 57 ATF_REQUIRE((fd1 = open(AFILE, O_CREAT, 0644)) != -1); 59 ATF_REQUIRE(dup2(fd1, fd2) != -1); 60 ATF_REQUIRE(fstat(fd1, &sb1) != -1); 73 int fd1, fd2, ret; local 75 ATF_REQUIRE((fd1 = open(AFILE, O_CREAT, 0644)) != -1); 77 ret = dup2(fd1, fd2);
|
/freebsd-11-stable/tools/tools/netrate/juggle/ |
H A D | juggle.c | 77 * Number of message cycles -- into fd1, out of fd2, into fd2, and out of 78 * fd1. By counting in cycles, we allow the master thread or process to 248 juggle(int fd1, int fd2, int pipeline) argument 259 if (message_send(fd1) < 0) 260 err(-1, "message_send fd1"); 272 if (message_recv(fd1) < 0) 273 err(-1, "message_recv fd1"); 330 thread_juggle(int fd1, int fd2, int pipeline) argument 360 if (message_send(fd1) < 0) 361 err(-1, "message_send fd1"); 389 process_juggle(int fd1, int fd2, int pipeline) argument 498 int fd1, fd2, i, j, p; local [all...] |
/freebsd-11-stable/tools/regression/sockets/accept_fd_leak/ |
H A D | accept_fd_leak.c | 70 int fd1, fd2, fd3, i, listen_port, s, status; local 77 fd1 = dup(STDIN_FILENO); 79 if (fd2 != fd1 + 1) 136 printf("not ok 1 - (%d, %d, %d)\n", fd1, fd2, fd3); 154 close(fd1); 210 printf("not ok 2 - (%d, %d, %d)\n", fd1, fd2, fd3);
|
/freebsd-11-stable/tests/sys/fifo/ |
H A D | fifo_misc.c | 72 cleanfifo(const char *fifoname, int fd1, int fd2) argument 75 if (fd1 != -1) 76 close(fd1); 85 int error, fd1, fd2; local 87 fd1 = open(fifoname, O_RDONLY | O_NONBLOCK); 88 if (fd1 < 0) 93 close(fd1); 97 *reader_fdp = fd1;
|
/freebsd-11-stable/contrib/ntp/sntp/libevent/test/ |
H A D | regress_listener.c | 81 evutil_socket_t fd1 = -1, fd2 = -1, fd3 = -1; local 117 fd1 = fd2 = fd3 = -1; 118 evutil_socket_connect_(&fd1, (struct sockaddr*)&ss1, slen1); 131 if (fd1>=0) 132 EVUTIL_CLOSESOCKET(fd1);
|
/freebsd-11-stable/tools/test/upsdl/ |
H A D | upsdl.c | 39 int mapBuffer(char** bufferp,int fd1,int fd2); 97 /* mmap a 2 page buffer - first page is from fd1, second page from fd2 */ 98 int mapBuffer(char** bufferp,int fd1,int fd2) argument 103 addr = mmap(NULL,pagesize*2, PROT_READ | PROT_WRITE , MAP_SHARED, fd1, 0);
|
/freebsd-11-stable/usr.sbin/ctm/mkCTM/ |
H A D | mkctm.c | 159 int fd1, fd2; local 165 fd1 = open(buf1, O_RDONLY); 166 if(fd1 < 0) { err(3, "%s", buf1); } 167 fstat(fd1, &s1); 179 close(fd1); 184 p1=mmap(0, s1.st_size, PROT_READ, MAP_PRIVATE, fd1, 0); 186 close(fd1); 320 int fd1; local 325 fd1 = open(buf2, O_RDONLY); 326 if (fd1 < [all...] |
/freebsd-11-stable/tools/regression/sockets/zerosend/ |
H A D | zerosend.c | 213 int fd1, fd2; local 222 fd1 = open(path, O_RDONLY | O_NONBLOCK); 223 if (fd1 < 0) 231 fdp[1] = fd1;
|
/freebsd-11-stable/tools/regression/sockets/unix_gc/ |
H A D | unix_gc.c | 118 close2(int fd1, int fd2) argument 121 close(fd1); 126 close3(int fd1, int fd2, int fd3) argument 129 close2(fd1, fd2); 134 close4(int fd1, int fd2, int fd3, int fd4) argument 137 close2(fd1, fd2); 142 close5(int fd1, int fd2, int fd3, int fd4, int fd5) argument 145 close3(fd1, fd2, fd3);
|
/freebsd-11-stable/contrib/mdocml/ |
H A D | catman.c | 69 sock_fd_write(int fd, int fd0, int fd1, int fd2) argument 101 *(walk++) = fd1;
|