Searched refs:fd (Results 376 - 400 of 1897) sorted by relevance

<<11121314151617181920>>

/openbsd-current/regress/sys/kern/kqueue/
H A Dkqueue-fdpass.c33 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 Dkqueue-exec.c87 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 Dopentap.c34 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 Dextern.h43 int fd; /* file descriptor */ member in struct:info
/openbsd-current/sys/arch/hppa/stand/cdboot/
H A Delf64.c33 ELFNAME(exec)(int fd, Elf_Ehdr *elf, uint64_t *marks, int flags) argument
/openbsd-current/gnu/llvm/clang/docs/analyzer/checkers/
H A Dunix_api_example.c4 int fd = open(path, O_CREAT); local
/openbsd-current/gnu/llvm/lld/Common/
H A DFilesystem.cpp83 // 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 Dmda_mbox.c60 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 Dforward.c32 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 Dptmget.c23 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 Dpollnval.c32 fds[0].fd = 0;
/openbsd-current/regress/sys/kern/accept/
H A Daccept.c28 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 DProcessLauncherWindows.h25 HANDLE GetStdioHandle(const ProcessLaunchInfo &launch_info, int fd);
/openbsd-current/sbin/isakmpd/
H A Dsa.c507 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 Dvnconfig.c187 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 DTerminal.h42 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 DLockFilePosix.cpp19 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 Dinet.c152 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 Dhost-linux.c97 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 Delf.c50 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 Dstty.c58 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 Dsanitizer_libc_test.cpp119 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 Dloadmsgcat.c67 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 Dloadmsgcat.c67 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 Dwc.c131 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...]

Completed in 178 milliseconds

<<11121314151617181920>>