Searched refs:fd2 (Results 26 - 50 of 66) sorted by relevance

123

/freebsd-11-stable/tools/regression/poll/
H A Dpipepoll.c93 int fd2, res; local
198 fd2 = open(FIFONAME, O_RDONLY | O_NONBLOCK);
199 if (fd2 < 0)
201 pfd.fd = fd2;
209 close(fd2);
H A Dpipeselect.c64 int fd1, fd2; local
191 fd2 = open(FIFONAME, O_RDONLY | O_NONBLOCK);
192 if (fd2 < 0)
195 fd = fd2;
205 close(fd2);
/freebsd-11-stable/contrib/netbsd-tests/fs/common/
H A Dsnapshot.c40 int fd, fd2, i; local
89 fd2 = rump_sys_open("/snap/myfile", O_RDONLY);
90 if (fd2 == -1)
93 if (rump_sys_read(fd2, buf, sizeof(buf)) == -1)
/freebsd-11-stable/tools/regression/sockets/zerosend/
H A Dzerosend.c213 int fd1, fd2; local
226 fd2 = open(path, O_WRONLY | O_NONBLOCK);
227 if (fd2 < 0)
230 fdp[0] = fd2;
/freebsd-11-stable/bin/sh/
H A Dinput.c361 int fd2; local
367 fd2 = fcntl(fd, F_DUPFD_CLOEXEC, 10);
369 if (fd2 < 0)
371 fd = fd2;
/freebsd-11-stable/tools/regression/sockets/unix_gc/
H A Dunix_gc.c118 close2(int fd1, int fd2) argument
122 close(fd2);
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/sys/fs/fdescfs/
H A Dfdesc_vnops.c138 struct fdescnode *fd2; local
142 LIST_FOREACH(fd2, fc, fd_hash) {
143 if (fd == fd2) {
157 struct fdescnode *fd, *fd2; local
226 LIST_FOREACH(fd2, fc, fd_hash) {
227 if (fd2->fd_ix == ix && fd2->fd_vnode->v_mount == mp) {
229 vp2 = fd2->fd_vnode;
/freebsd-11-stable/contrib/mdocml/
H A Dcatman.c69 sock_fd_write(int fd, int fd0, int fd1, int fd2) argument
102 *(walk++) = fd2;
/freebsd-11-stable/bin/pax/
H A Dbuf_subs.c752 cp_file(ARCHD *arcn, int fd1, int fd2) argument
775 if (fstat(fd2, &sb) == 0) {
789 res = write(fd2, buf, cnt);
791 res = file_write(fd2, buf, cnt, &rem, &isem, sz, fnm);
819 file_flush(fd2, fnm, isem);
/freebsd-11-stable/tools/tools/net80211/wlaninject/
H A Dwlaninject.c528 int fd, fd2; local
761 fd2 = open_bpf(verify);
778 FD_SET(fd2, &fds);
787 if (select(fd2+1, &fds, NULL, NULL, &tv) == -1)
789 if (!FD_ISSET(fd2, &fds))
792 if ((rc = read(fd2, buf2, sizeof(buf2))) == -1)
802 close(fd2);
/freebsd-11-stable/usr.sbin/ctm/mkCTM/
H A Dmkctm.c159 int fd1, fd2; local
171 fd2 = open(buf2, O_RDONLY);
172 if(fd2 < 0) { err(3, "%s", buf2); }
173 fstat(fd2, &s2);
180 close(fd2);
188 p2=mmap(0, s2.st_size, PROT_READ, MAP_PRIVATE, fd2, 0);
190 close(fd2);
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/gen/posix_spawn/
H A Dt_fileactions.c302 int fd1, fd2, fd3, status, err; local
315 fd2 = open("/dev/null", O_WRONLY, O_CLOEXEC);
316 ATF_REQUIRE(fd2 == 4);
/freebsd-11-stable/contrib/gdb/include/
H A Dlibiberty.h141 extern int fdmatch PARAMS ((int fd1, int fd2));
/freebsd-11-stable/tests/sys/fifo/
H A Dfifo_io.c109 cleanfifo2(const char *fifoname, int fd1, int fd2) argument
114 if (fd2 != -1)
115 close(fd2);
120 cleanfifo3(const char *fifoname, int fd1, int fd2, int fd3) argument
125 cleanfifo2(fifoname, fd1, fd2);
135 int error, fd1, fd2; local
140 fd2 = open(fifoname, O_WRONLY | O_NONBLOCK);
141 if (fd2 < 0) {
148 *writer_fdp = fd2;
/freebsd-11-stable/sbin/sconfig/
H A Dsconfig.c941 int fd, fd1, fd2, fd3, i;
954 for (i=0, fd2=-1; i<3 && fd2<0; i++) {
956 fd2 = open (buf, 0);
965 if ((fd < 0) && (fd1 < 0) && (fd2 < 0) && (fd3 < 0)) {
986 if (fd2 >= 0) {
987 if (ioctl (fd2, SERIAL_GETREGISTERED, (mask+32)) < 0) {
991 close (fd2);
/freebsd-11-stable/usr.bin/at/
H A Dat.c216 int fdes, lockdes, fd2; local
288 if ((fd2 = dup(fdes)) <0)
291 if(fchown(fd2, real_uid, real_gid) != 0)
437 if (fchmod(fd2, S_IRUSR | S_IWUSR | S_IXUSR) < 0)
440 close(fd2);
/freebsd-11-stable/tools/regression/sockets/unix_cmsg/
H A Duc_common.c505 int fd1, fd2; local
521 fd2 = uc_cfg.sync_fd[SYNC_CLIENT][SYNC_SEND];
524 fd2 = uc_cfg.sync_fd[SYNC_CLIENT][SYNC_RECV];
526 if (close(fd1) < 0 || close(fd2) < 0) {
/freebsd-11-stable/contrib/atf/atf-c/detail/
H A Dfs_test.c942 int fd1, fd2; local
948 fd1 = fd2 = -1;
950 RE(atf_fs_mkstemp(&p2, &fd2));
956 ATF_CHECK(fd2 != -1);
958 ATF_CHECK(write(fd2, "bar", 3) == 3);
960 close(fd2);
/freebsd-11-stable/crypto/heimdal/lib/krb5/
H A Dfcache.c976 int fd1, fd2; local
985 ret = fcc_open(context, to, &fd2,
991 sz2 = write(fd2, buf, sz1);
1008 fcc_unlock(context, fd2);
1009 close(fd2);
/freebsd-11-stable/contrib/netbsd-tests/fs/vfs/
H A Dt_vnops.c754 int fd, fd2; local
773 RL(fd2 = rump_sys_open(TESTFILE, O_RDWR, 0));
774 ATF_REQUIRE_ERRNO(EAGAIN, rump_sys_fcntl(fd2, F_SETLK, &l));
784 RL(rump_sys_fcntl(fd2, F_SETLK, &l));
786 RL(rump_sys_close(fd2));
/freebsd-11-stable/lib/libc/tests/sys/
H A Dsendfile_test.c666 int client_sock, error, fd, fd2, i, port, rc, server_sock; local
712 fd2 = open(SOURCE_FILE ".full", O_RDONLY);
713 ATF_REQUIRE_MSG(fd2 != -1, "open failed: %s", strerror(errno));
731 verify_source_and_dest(DESTINATION_FILE, fd2, offset, nbytes);
734 (void)close(fd2);
/freebsd-11-stable/usr.sbin/tzsetup/
H A Dtzsetup.c711 int fd1, fd2, copymode; local
769 fd2 = open(path_localtime, O_CREAT | O_EXCL | O_WRONLY,
771 if (fd2 < 0) {
786 if ((len = write(fd2, buf, len)) < 0)
805 close(fd2);
/freebsd-11-stable/contrib/gcclibs/include/
H A Dlibiberty.h167 extern int fdmatch (int fd1, int fd2);
/freebsd-11-stable/contrib/binutils/include/
H A Dlibiberty.h171 extern int fdmatch (int fd1, int fd2);
/freebsd-11-stable/crypto/heimdal/appl/gssmask/
H A Dgssmaestro.c273 int fd, fd2, ret; local
302 fd2 = accept(fd, (struct sockaddr *)&sast, &salen);
303 if (fd2 < 0)
307 return fd2;

Completed in 322 milliseconds

123