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

123

/freebsd-current/tests/sys/fs/fusefs/
H A Dfsync.cc269 int fd1, fd2; local
276 fd1 = open(FULLPATH, O_WRONLY);
277 ASSERT_LE(0, fd1) << strerror(errno);
280 ASSERT_EQ(bufsize, write(fd1, CONTENTS, bufsize)) << strerror(errno);
281 ASSERT_EQ(0, fsync(fd1)) << strerror(errno);
283 leak(fd1);
H A Dunlink.cc72 int fd1; local
79 fd1 = open(FULLPATH1, O_RDONLY);
80 ASSERT_LE(0, fd1) << strerror(errno);
82 ASSERT_EQ(0, fstat(fd1, &sb_old)) << strerror(errno);
84 ASSERT_EQ(0, fstat(fd1, &sb_new)) << strerror(errno);
88 leak(fd1);
H A Dflush.cc150 int fd0, fd1; local
166 fd1 = open(FULLPATH1, O_WRONLY);
167 ASSERT_LE(0, fd1) << strerror(errno);
170 EXPECT_EQ(0, close(fd1)) << strerror(errno);
H A Dallow_other.cc136 int fd1, status; local
170 fd1 = open(FULLPATH, O_RDONLY);
171 ASSERT_LE(0, fd1) << strerror(errno);
190 leak(fd1);
H A Dopen.cc169 int fd1, status; local
208 fd1 = open(FULLPATH, O_RDONLY);
209 ASSERT_LE(0, fd1) << strerror(errno);
224 close(fd1);
H A Dinterrupt.cc409 int fd1; local
439 fd1 = open(FULLPATH1, O_RDONLY);
440 ASSERT_LE(0, fd1) << strerror(errno);
448 ASSERT_EQ(0, pthread_create(&th1, NULL, read1, (void*)(intptr_t)fd1))
468 leak(fd1);
484 int fd1; local
514 fd1 = open(FULLPATH1, O_WRONLY);
515 ASSERT_LE(0, fd1) << strerror(errno);
525 r = extattr_set_fd(fd1, ns, "foo", (const void*)value, value_len);
540 leak(fd1);
[all...]
H A Dreaddir.cc251 int fd0, fd1; local
274 fd1 = open(FULLPATH, O_DIRECTORY);
275 ASSERT_LE(0, fd1) << strerror(errno);
282 r = getdirentries(fd1, buf, sizeof(buf), 0);
286 leak(fd1);
/freebsd-current/usr.bin/cmp/
H A Dregular.c53 c_regular(int fd1, const char *file1, off_t skip1, off_t len1, argument
83 if ((m1 = remmap(NULL, fd1, off1)) == NULL) {
84 c_special(fd1, file1, skip1, fd2, file2, skip2, limit);
90 c_special(fd1, file1, skip1, fd2, file2, skip2, limit);
94 if (caph_rights_limit(fd1, cap_rights_init(&rights, CAP_MMAP_R)) < 0)
142 if ((p1 = m1 = remmap(m1, fd1, off1)) == NULL) {
/freebsd-current/tools/test/stress2/misc/
H A Ddatamove3.sh103 int fd1;
156 /* mmap a 2 page buffer - first page is from fd1, second page from fd2 */
165 addr = mmap(NULL, pagesize * 2, PROT_READ | PROT_WRITE, MAP_SHARED, a[i].fd1, 0);
212 a[0].fd1 = fdDelayA;
215 a[1].fd1 = fdDelayB;
H A Ddatamove.sh102 int mapBuffer(char** bufferp,int fd1,int fd2);
159 /* mmap a 2 page buffer - first page is from fd1, second page from fd2 */
160 int mapBuffer(char** bufferp,int fd1,int fd2)
165 addr = mmap(NULL,pagesize*2, PROT_READ | PROT_WRITE , MAP_SHARED, fd1, 0);
H A Ddatamove4.sh98 int mapBuffer (char **bufferp, int fd1, int fd2);
149 /* mmap a 2 page buffer - first page is from fd1, second page from fd2 */
151 mapBuffer(char **bufferp, int fd1, int fd2)
156 addr = mmap(NULL, pagesize * 2, PROT_READ | PROT_WRITE, MAP_SHARED, fd1, 0);
H A Ddatamove2.sh91 int mapBuffer (char **bufferp, int fd1, int fd2);
142 /* mmap a 2 page buffer - first page is from fd1, second page from fd2 */
144 mapBuffer(char **bufferp, int fd1, int fd2)
149 addr = mmap(NULL, pagesize * 2, PROT_READ | PROT_WRITE, MAP_SHARED, fd1, 0);
H A Ddatamove5.sh108 int mapBuffer (char **bufferp, int fd1, int fd2);
159 /* mmap a 2 page buffer - first page is from fd1, second page from fd2 */
161 mapBuffer(char **bufferp, int fd1, int fd2)
166 addr = mmap(NULL, pagesize * 2, PROT_READ | PROT_WRITE, MAP_SHARED, fd1, 0);
/freebsd-current/tools/regression/sockets/zerosend/
H A Dzerosend.c211 int fd1, fd2; local
220 fd1 = open(path, O_RDONLY | O_NONBLOCK);
221 if (fd1 < 0)
229 fdp[1] = fd1;
/freebsd-current/contrib/mandoc/
H A Dcatman.c69 sock_fd_write(int fd, int fd0, int fd1, int fd2) argument
101 *(walk++) = fd1;
/freebsd-current/tools/regression/sockets/unix_gc/
H A Dunix_gc.c116 close2(int fd1, int fd2) argument
119 close(fd1);
124 close3(int fd1, int fd2, int fd3) argument
127 close2(fd1, fd2);
132 close4(int fd1, int fd2, int fd3, int fd4) argument
135 close2(fd1, fd2);
140 close5(int fd1, int fd2, int fd3, int fd4, int fd5) argument
143 close3(fd1, fd2, fd3);
/freebsd-current/usr.bin/mail/
H A Dpopen.c99 int myside, hisside, fd0, fd1; local
110 hisside = fd0 = fd1 = p[WRITE];
114 fd1 = -1;
117 pid = start_command(value("SHELL"), &nset, fd0, fd1, "-c", cmd, NULL);
/freebsd-current/tools/regression/poll/
H A Dpipeselect.c63 int fd1, fd2; local
193 fd1 = fd;
199 fd = fd1;
/freebsd-current/tests/sys/fifo/
H A Dfifo_io.c107 cleanfifo2(const char *fifoname, int fd1, int fd2) argument
110 if (fd1 != -1)
111 close(fd1);
118 cleanfifo3(const char *fifoname, int fd1, int fd2, int fd3) argument
123 cleanfifo2(fifoname, fd1, fd2);
133 int error, fd1, fd2; local
135 fd1 = open(fifoname, O_RDONLY | O_NONBLOCK);
136 if (fd1 < 0)
141 close(fd1);
145 *reader_fdp = fd1;
[all...]
/freebsd-current/contrib/netbsd-tests/lib/libc/gen/posix_spawn/
H A Dt_fileactions.c302 int fd1, fd2, fd3, status, err; local
319 fd1 = open("/dev/null", O_RDONLY);
320 ATF_REQUIRE_EQ(fd1, lowfd);
328 posix_spawn_file_actions_addclose(&fa, fd1);
/freebsd-current/sbin/newfs_msdos/
H A Dmkfs_msdos.c254 int fd, fd1, rv; local
260 fd = fd1 = -1;
436 fd1 = -1;
443 if ((fd1 = open(bname, O_RDONLY)) == -1 || fstat(fd1, &sb)) {
665 if (!x && lseek(fd1, o.offset, SEEK_SET)) {
671 if ((n = read(fd1, img, bpb.bpbBytesPerSec)) == -1) {
798 if (fd1 != -1)
799 close(fd1);
/freebsd-current/bin/pax/
H A Dbuf_subs.c746 cp_file(ARCHD *arcn, int fd1, int fd2) argument
780 if ((cnt = read(fd1, buf, blksz)) <= 0)
800 else if (fstat(fd1, &sb) < 0)
/freebsd-current/tools/regression/sockets/unix_cmsg/
H A Duc_common.c503 int fd1, fd2; local
518 fd1 = uc_cfg.sync_fd[SYNC_SERVER][SYNC_RECV];
521 fd1 = uc_cfg.sync_fd[SYNC_SERVER][SYNC_SEND];
524 if (close(fd1) < 0 || close(fd2) < 0) {
/freebsd-current/sys/fs/fdescfs/
H A Dfdesc_vnops.c292 u_int fd, fd1; local
324 fd1 = 10 * fd + *pname++ - '0';
325 if (fd1 < fd) {
329 fd = fd1;
/freebsd-current/contrib/atf/atf-c/detail/
H A Dfs_test.c949 int fd1, fd2; local
955 fd1 = fd2 = -1;
956 RE(atf_fs_mkstemp(&p1, &fd1));
962 ATF_CHECK(fd1 != -1);
964 ATF_CHECK(write(fd1, "foo", 3) == 3);
966 close(fd1);

Completed in 129 milliseconds

123