/openbsd/regress/sys/kern/dup2/ |
H A D | dup2test.c | 14 int orgfd, fd1, fd2; in main() local 24 if ((fd1 = dup(orgfd)) < 0) in main() 28 if (fcntl(fd1, F_SETFD, 1) != 0) in main() 31 if ((fd2 = dup2(fd1, fd1 + 1)) < 0) in main() 35 if (fd2 != fd1 + 1) in main()
|
/openbsd/regress/sys/kern/dup2_self/ |
H A D | dup2_self.c | 34 int orgfd, fd1, fd2; in main() local 44 if ((fd1 = dup(orgfd)) < 0) in main() 48 if (fcntl(fd1, F_SETFD, 1) != 0) in main() 51 if ((fd2 = dup2(fd1, fd1)) < 0) in main() 55 if (fd2 != fd1) in main()
|
/openbsd/regress/lib/libc/sys/ |
H A D | t_dup.c | 59 int fd, fd1, fd2; in check_mode() local 73 ATF_REQUIRE(fd1 >= 0); in check_mode() 77 fd = dup(fd1); in check_mode() 79 fd = dup2(fd1, fd2); in check_mode() 81 fd = dup3(fd1, fd2, O_CLOEXEC); in check_mode() 98 (void)close(fd1); in check_mode() 113 int fd, fd1, fd2; in ATF_TC_BODY() local 115 fd1 = open("/etc/passwd", O_RDONLY); in ATF_TC_BODY() 118 ATF_REQUIRE(fd1 >= 0); in ATF_TC_BODY() 121 fd = dup2(fd1, fd2); in ATF_TC_BODY() [all …]
|
/openbsd/usr.bin/cmp/ |
H A D | cmp.c | 57 int ch, fd1, fd2, special; in main() local 88 fd1 = 0; in main() 90 } else if ((fd1 = open(file1, O_RDONLY)) == -1) in main() 108 if (fstat(fd1, &sb1) == -1) in main() 121 c_special(fd1, file1, skip1, fd2, file2, skip2); in main() 123 c_regular(fd1, file1, skip1, sb1.st_size, in main()
|
H A D | regular.c | 47 c_regular(int fd1, char *file1, off_t skip1, off_t len1, in c_regular() argument 67 c_special(fd1, file1, skip1, fd2, file2, skip2); in c_regular() 72 MAP_PRIVATE, fd1, skip1)) == MAP_FAILED) in c_regular()
|
H A D | special.c | 43 c_special(int fd1, char *file1, off_t skip1, int fd2, char *file2, off_t skip2) in c_special() argument 50 if ((fp1 = fdopen(fd1, "r")) == NULL) in c_special()
|
/openbsd/regress/sys/kern/fcntl_dup/ |
H A D | fcntl_dup.c | 14 int orgfd, fd1, fd2; in main() local 24 if ((fd1 = dup(orgfd)) < 0) in main() 28 if (fcntl(fd1, F_SETFD, 1) != 0) in main() 31 if ((fd2 = fcntl(fd1, F_DUPFD, 0)) < 0) in main()
|
/openbsd/regress/sys/kern/bind/ |
H A D | bind.c | 11 int fd1, fd2, enable = 1; in main() local 26 if ((fd1 = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) in main() 29 if (setsockopt(fd1, SOL_SOCKET, SO_REUSEPORT, &enable, in main() 33 if (bind(fd1, (struct sockaddr *)&addr1, sizeof(addr1)) == -1) in main()
|
/openbsd/regress/sys/kern/unveil/ |
H A D | socket.c | 15 int c_fd1, c_fd2, fd1, fd2, fd3; in test_bind_unix_socket() local 65 if ((fd1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) in test_bind_unix_socket() 68 (bind(fd1, (struct sockaddr *)&sun1, sizeof(sun1)) == -1), "bind"); in test_bind_unix_socket() 69 if (listen(fd1, 5) == -1) in test_bind_unix_socket() 98 close(fd1); in test_bind_unix_socket()
|
H A D | unveil.h | 103 int fd1, fd2; in test_setup() local 108 UV_SHOULD_SUCCEED(((fd1 = mkstemp(uv_file1)) == -1), "mkstemp"); in test_setup() 109 close(fd1); in test_setup()
|
/openbsd/regress/sys/dev/video/ |
H A D | videotest.c | 283 int fd1, fd2; in test_capture() local 291 fd1 = last_pixelformat = n1 = 0; in test_capture() 320 fd1 = open(dev_full, O_RDWR); in test_capture() 321 if (fd1 == -1) in test_capture() 337 r = ioctl(fd1, VIDIOC_S_FMT, &fmt); in test_capture() 362 n1 = test_capture_read(fd1, buf, buf_size, in test_capture() 365 n1 = test_capture_mmap(fd1, buf, buf_size, in test_capture() 417 close(fd1); in test_capture() 426 close(fd1); in test_capture()
|
/openbsd/gnu/lib/libiberty/src/ |
H A D | fdmatch.c | 52 int fdmatch (int fd1, int fd2) in fdmatch() argument 57 if ((fstat (fd1, &sbuf1) == 0) && in fdmatch()
|
/openbsd/gnu/usr.bin/gcc/gcc/testsuite/g++.old-deja/g++.law/ |
H A D | operators33.C | 22 inline void push(FILE * fd1, int line_num, char *fname = NULL) { 24 tmp->fd = fd1;
|
/openbsd/usr.bin/cvs/ |
H A D | diff.c | 304 int fd1, fd2; in cvs_diff_local() local 311 fd1 = fd2 = -1; in cvs_diff_local() 490 fd1 = rcs_rev_write_stmp(cf->file_rcs, diff_rev1, p1, 0); in cvs_diff_local() 491 if (futimes(fd1, tv) == -1) in cvs_diff_local() 588 if (fd1 == -1) { in cvs_diff_local() 589 if ((fd1 = open(CVS_PATH_DEVNULL, O_RDONLY)) == -1) in cvs_diff_local() 598 p2 != NULL ? cf->file_path : CVS_PATH_DEVNULL, fd1, fd2, NULL, in cvs_diff_local() 602 close(fd1); in cvs_diff_local()
|
H A D | commit.c | 689 int fd1, fd2, d; in commit_diff() local 698 fd1 = buf_write_stmp(b, p1, NULL); in commit_diff() 701 fd1 = rcs_rev_write_stmp(cf->file_rcs, rev, p1, 0); in commit_diff() 712 d = diffreg(p2, p1, fd2, fd1, b, D_FORCEASCII); in commit_diff() 714 d = diffreg(p1, p2, fd1, fd2, b, D_FORCEASCII); in commit_diff() 718 close(fd1); in commit_diff()
|
H A D | import.c | 474 int fd1, fd2; in import_get_rcsdiff() local 481 fd1 = buf_write_stmp(b1, p1, NULL); in import_get_rcsdiff() 488 if (diffreg(p2, p1, fd2, fd1, b2, D_FORCEASCII) == D_ERROR) in import_get_rcsdiff() 491 close(fd1); in import_get_rcsdiff()
|
/openbsd/gnu/usr.bin/cvs/emx/ |
H A D | filesubr.c | 560 int fd1, fd2; local 563 if ((fd1 = open (file1, O_RDONLY | O_BINARY)) < 0) 567 if (fstat (fd1, &sb1) < 0) 593 read1 = block_read (fd1, buf1, buf_size); 610 (void) close (fd1);
|
/openbsd/gnu/usr.bin/cvs/os2/ |
H A D | filesubr.c | 535 int fd1, fd2; local 538 if ((fd1 = open (file1, O_RDONLY | O_BINARY)) < 0) 542 if (fstat (fd1, &sb1) < 0) 568 read1 = block_read (fd1, buf1, buf_size); 585 (void) close (fd1);
|
/openbsd/usr.bin/mail/ |
H A D | popen.c | 101 int myside, hisside, fd0, fd1; in Popen() local 112 hisside = fd0 = fd1 = p[WRITE]; in Popen() 116 fd1 = -1; in Popen() 119 pid = start_command(value("SHELL"), &nset, fd0, fd1, "-c", cmd, NULL); in Popen()
|
/openbsd/gnu/lib/libstdc++/libstdc++/testsuite/22_locale/ |
H A D | moneypunct_byname.cc | 61 int fd1 = monp_de.frac_digits(); in test01() local 81 VERIFY( fd1 == fd2 ); in test01()
|
H A D | moneypunct_members_char.cc | 76 int fd1 = monp_c_t.frac_digits(); in test01() local 96 VERIFY( fd1 != fd2 ); in test01()
|
H A D | moneypunct_members_wchar_t.cc | 77 int fd1 = monp_c_t.frac_digits(); in test01() local 97 VERIFY( fd1 != fd2 ); in test01()
|
/openbsd/gnu/usr.bin/cvs/windows-NT/ |
H A D | filesubr.c | 602 int fd1, fd2; local 605 if ((fd1 = open (file1, O_RDONLY | O_BINARY)) < 0) 609 if (fstat (fd1, &sb1) < 0) 635 read1 = block_read (fd1, buf1, buf_size); 652 (void) close (fd1);
|
/openbsd/gnu/usr.bin/cvs/vms/ |
H A D | filesubr.c | 590 int fd1, fd2; local 606 if ((fd1 = open (file1, O_RDONLY)) < 0) 610 if (fstat (fd1, &sb1) < 0) 636 read1 = block_read (fd1, buf1, buf_size); 653 (void) close (fd1);
|
/openbsd/bin/pax/ |
H A D | buf_subs.c | 752 cp_file(ARCHD *arcn, int fd1, int fd2) in cp_file() argument 786 if ((cnt = read(fd1, buf, blksz)) <= 0) in cp_file() 806 else if (fstat(fd1, &sb) == -1) in cp_file()
|