/openbsd-current/regress/sys/kern/kqueue/ |
H A D | kqueue-fdpass.c | 33 int pfd[2], fd, status; local 45 fd = kqueue(); 48 if (kevent(fd, &ke, 1, NULL, 0, NULL) != 0) 61 *(int *)CMSG_DATA(cmp) = fd;
|
H A D | kqueue-exec.c | 87 int cloexec, fd; local 91 errx(1, "fd arg is missing"); 92 fd = atoi(arg); 101 if (kevent(fd, NULL, 0, NULL, 0, 0) == -1) { 106 "kqueue cloexec fd is not closed"); 109 if (kevent(fd, NULL, 0, NULL, 0, 0) == -1) {
|
/openbsd-current/regress/usr.sbin/ospfd/ |
H A D | opentap.c | 34 fprintf(stderr, "usage: sudo %s fd# tap#\n", getprogname()); 35 fprintf(stderr, " fd# number of file descriptor for fd passing\n"); 43 int fd, tap; local 56 fd = strtonum(argv[1], 0, INT_MAX, &errstr); 77 if (sendmsg(fd, &msg, 0) == -1) 78 err(1, "sendmsg %d", fd);
|
/openbsd-current/usr.sbin/lpr/lpd/ |
H A D | extern.h | 43 int fd; /* file descriptor */ member in struct:info
|
/openbsd-current/sys/arch/hppa/stand/cdboot/ |
H A D | elf64.c | 33 ELFNAME(exec)(int fd, Elf_Ehdr *elf, uint64_t *marks, int flags) argument
|
/openbsd-current/gnu/llvm/clang/docs/analyzer/checkers/ |
H A D | unix_api_example.c | 4 int fd = open(path, O_CREAT); local
|
/openbsd-current/gnu/llvm/lld/Common/ |
H A D | Filesystem.cpp | 83 // since the open fd guarantees that it is not removing the last reference. 84 int fd; 85 std::error_code ec = sys::fs::openFileForRead(path, fd); 95 std::thread([&, fd] { 101 ::close(fd);
|
/openbsd-current/usr.sbin/smtpd/ |
H A D | mda_mbox.c | 60 int fd; local 69 if ((fd = open(buffer, O_CREAT|O_EXCL, 0)) == -1) { 75 if (fchown(fd, deliver->userinfo.uid, deliver->userinfo.gid) == -1) 78 if (fchmod(fd, S_IRUSR|S_IWUSR) == -1)
|
H A D | forward.c | 32 forwards_get(int fd, struct expand *expand) argument 43 if (fstat(fd, &sb) == -1) 59 if ((fp = fdopen(fd, "r")) == NULL) { 85 close(fd);
|
/openbsd-current/regress/sys/kern/ptmget/ |
H A D | ptmget.c | 23 int fd; local 34 fd = open("/dev/ptm", O_RDWR); 35 if (fd == -1) 37 if ((ioctl(fd, PTMGET, &ptm) == -1))
|
/openbsd-current/regress/sys/kern/poll/ |
H A D | pollnval.c | 32 fds[0].fd = 0;
|
/openbsd-current/regress/sys/kern/accept/ |
H A D | accept.c | 28 int fd, lastfd; local 57 while ((fd = open("/dev/null", O_RDONLY)) >= 0) 58 lastfd = fd; 65 close(lastfd); /* Close one fd so that accept can succeed */ 85 int i, fd, sock; local
|
/openbsd-current/gnu/llvm/lldb/include/lldb/Host/windows/ |
H A D | ProcessLauncherWindows.h | 25 HANDLE GetStdioHandle(const ProcessLaunchInfo &launch_info, int fd);
|
/openbsd-current/sbin/isakmpd/ |
H A D | sa.c | 507 report_spi(FILE *fd, const u_int8_t *buf, size_t sz, int spi) argument 519 fprintf(fd, "%s", s); 528 fprintf(fd, "SPI %d: %s\n", spi, s); 538 report_proto(FILE *fd, struct proto *proto) argument 547 fprintf(fd, "Transform: IPsec ESP\n"); 548 fprintf(fd, "Encryption key length: %d\n", keylen); 549 fprintf(fd, "Authentication key length: %d\n", hashlen); 551 fprintf(fd, "Encryption algorithm: "); 554 fprintf(fd, "3DES\n"); 558 fprintf(fd, "AE 675 report_lifetimes(FILE *fd, struct sa *sa) argument 706 report_phase1(FILE *fd, struct sa *sa) argument 718 report_phase2(FILE *fd, struct sa *sa) argument 756 sa_dump_all(FILE *fd, struct sa *sa) argument 788 sa_report_all(FILE *fd) argument [all...] |
/openbsd-current/sbin/vnconfig/ |
H A D | vnconfig.c | 187 int fd; local 189 fd = open(saltfile, O_RDONLY); 190 if (fd == -1) { 195 fd = open(saltfile, O_RDWR|O_CREAT|O_EXCL, 0600); 196 if (fd == -1) 202 if (write(fd, saltbuf, sizeof(saltbuf)) 209 if (read(fd, saltbuf, sizeof(saltbuf)) 214 close(fd); 286 int fd, rv = -1; local 296 if ((fd 337 int fd, rv = -1; local [all...] |
/openbsd-current/gnu/llvm/lldb/include/lldb/Host/ |
H A D | Terminal.h | 42 Terminal(int fd = -1) : m_fd(fd) {} 50 void SetFileDescriptor(int fd) { m_fd = fd; } argument 94 /// of. If the instance is not associated with a fd, no state will 106 /// Save the TTY state for \a fd. 108 /// Save the current state of the TTY for the file descriptor "fd" and if 113 /// The Terminal instance holding fd to save. 120 /// Returns \b true if \a fd describes a TTY and if the state
|
/openbsd-current/gnu/llvm/lldb/source/Host/posix/ |
H A D | LockFilePosix.cpp | 19 static Status fileLock(int fd, int cmd, int lock_type, const uint64_t start, argument 30 if (llvm::sys::RetryAfterSignal(-1, ::fcntl, fd, cmd, &fl) == -1) 36 LockFilePosix::LockFilePosix(int fd) : LockFileBase(fd) {} argument
|
/openbsd-current/lib/libpcap/ |
H A D | inet.c | 152 int fd, minunit, n; 159 fd = socket(AF_INET, SOCK_DGRAM, 0); 160 if (fd == -1) { 169 if (ioctl(fd, SIOCGIFCONF, (char *)&ifc) == -1 || 173 (void)close(fd); 201 if (ioctl(fd, SIOCGIFFLAGS, (char *)&ifr) == -1) { 208 (void)close(fd); 225 (void)close(fd); 241 int fd; local 245 fd [all...] |
/openbsd-current/gnu/gcc/gcc/config/ |
H A D | host-linux.c | 97 linux_gt_pch_get_address (size_t size, int fd) argument 105 MAP_PRIVATE, fd, 0); 145 addr = mmap (0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); 171 linux_gt_pch_use_address (void *base, size_t size, int fd, size_t offset) argument 182 addr = mmap (base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, offset); 201 if (lseek (fd, offset, SEEK_SET) == (off_t)-1) 208 nbytes = read (fd, base, MIN (size, SSIZE_MAX));
|
/openbsd-current/usr.bin/gprof/ |
H A D | elf.c | 50 int fd; local 63 if ((fd = open(filename, O_RDONLY)) == -1) 65 if (read(fd, &h, sizeof h) != sizeof h || !IS_ELF(h)) { 66 close(fd); 69 if (fstat(fd, &s) == -1) 71 if ((mapbase = mmap(0, s.st_size, PROT_READ, MAP_SHARED, fd, 0)) == 74 close(fd);
|
/openbsd-current/bin/stty/ |
H A D | stty.c | 58 i.fd = STDIN_FILENO; 72 if ((i.fd = open(optarg, O_RDONLY | O_NONBLOCK)) == -1) 90 if (ioctl(i.fd, TIOCGETD, &i.ldisc) == -1) 93 if (tcgetattr(i.fd, &i.t) == -1) 95 if (ioctl(i.fd, TIOCGWINSZ, &i.win) == -1) 157 if (i.set && tcsetattr(i.fd, 0, &i.t) == -1) 159 if (i.wset && ioctl(i.fd, TIOCSWINSZ, &i.win) == -1)
|
/openbsd-current/gnu/llvm/compiler-rt/lib/sanitizer_common/tests/ |
H A D | sanitizer_libc_test.cpp | 119 fd_t fd = OpenFile(tmpfile, WrOnly); local 120 ASSERT_NE(fd, kInvalidFd); 121 ASSERT_TRUE(WriteToFile(fd, "A", 1)); 122 CloseFile(fd); 124 fd = OpenFile(tmpfile, WrOnly); 125 ASSERT_NE(fd, kInvalidFd); 127 EXPECT_EQ(internal_lseek(fd, 0, SEEK_END), 0u); 130 EXPECT_TRUE(WriteToFile(fd, str1, len1, &bytes_written)); 132 EXPECT_TRUE(WriteToFile(fd, str2, len2, &bytes_written)); 134 CloseFile(fd); 319 fd_t fd = OpenFile(tmpfile, RdWr); local 361 fd_t fd = OpenFile(tmpfile, WrOnly); local [all...] |
/openbsd-current/gnu/usr.bin/binutils/intl/ |
H A D | loadmsgcat.c | 67 int fd; local 88 fd = open (domain_file->filename, O_RDONLY); 89 if (fd == -1) 93 if (fstat (fd, &st) != 0 98 close (fd); 107 MAP_PRIVATE, fd, 0); 112 close (fd); 132 long int nb = (long int) read (fd, read_ptr, to_read); 135 close (fd); 144 close (fd); [all...] |
/openbsd-current/gnu/usr.bin/binutils-2.17/intl/ |
H A D | loadmsgcat.c | 67 int fd; local 88 fd = open (domain_file->filename, O_RDONLY); 89 if (fd == -1) 93 if (fstat (fd, &st) != 0 98 close (fd); 107 MAP_PRIVATE, fd, 0); 112 close (fd); 132 long int nb = (long int) read (fd, read_ptr, to_read); 135 close (fd); 144 close (fd); [all...] |
/openbsd-current/usr.bin/wc/ |
H A D | wc.c | 131 int fd; local 137 if ((fd = open(file, O_RDONLY)) == -1) { 144 fd = STDIN_FILENO; 159 while ((len = read(fd, buf, _MAXBSIZE)) > 0) { 183 while ((len = read(fd, buf, _MAXBSIZE)) > 0) { 204 if (fstat(fd, &sbuf)) { 213 while ((len = read(fd, buf, _MAXBSIZE)) > 0) 225 else if ((stream = fdopen(fd, "r")) == NULL) { 227 close(fd); 271 if ((stream == NULL ? close(fd) [all...] |