/openbsd-current/regress/usr.bin/mandoc/db/makeinodes/ |
H A D | makeinodes.c | 31 int fd, rev; local 52 if ((fd = open("1", O_WRONLY | O_CREAT | O_EXCL, 0644)) == -1) 54 if (fstat(fd, &sb1) == -1) 56 if (close(fd) == -1) 58 if ((fd = open("2", O_WRONLY | O_CREAT | O_EXCL, 0644)) == -1) 60 if (fstat(fd, &sb2) == -1) 62 if (close(fd) == -1) 65 if ((fd = open("3", O_WRONLY | O_CREAT | O_EXCL, 0644)) == -1) 67 if (fstat(fd, &sb2) == -1) 69 if (close(fd) [all...] |
/openbsd-current/gnu/llvm/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_file.h | 37 fd_t fd; member in struct:__sanitizer::ReportFile 42 // PID of the process that opened fd. If a fork() occurs, 63 bool ReadFromFile(fd_t fd, void *buff, uptr buff_size, 65 bool WriteToFile(fd_t fd, const void *buff, uptr buff_size, 70 explicit FileCloser(fd_t fd) : fd(fd) {} argument 71 ~FileCloser() { CloseFile(fd); } 72 fd_t fd; member in struct:__sanitizer::FileCloser 75 bool SupportsColoredOutput(fd_t fd); [all...] |
/openbsd-current/usr.sbin/ldpd/ |
H A D | accept.c | 31 int fd; member in struct:accept_ev 52 accept_add(int fd, void (*cb)(int, short, void *), void *arg) argument 58 av->fd = fd; 63 event_set(&av->ev, av->fd, EV_READ, accept_cb, av); 66 log_debug("%s: accepting on fd %d", __func__, fd); 72 accept_del(int fd) argument 77 if (av->fd == fd) { 123 accept_cb(int fd, short event, void *arg) argument 131 accept_timeout(int fd, short event, void *bula) argument [all...] |
/openbsd-current/usr.sbin/npppd/npppd/ |
H A D | accept.c | 33 int fd; member in struct:accept_ev 54 accept_add(int fd, void (*cb)(int, short, void *), void *arg) argument 60 av->fd = fd; 65 event_set(&av->ev, av->fd, EV_READ, accept_cb, av); 68 log_debug("accept_add: accepting on fd %d", fd); 74 accept_del(int fd) argument 79 if (av->fd == fd) { 125 accept_cb(int fd, short event, void *arg) argument 133 accept_timeout(int fd, short event, void *bula) argument [all...] |
/openbsd-current/libexec/ftpd/ |
H A D | logutmp.c | 50 static int fd = -1; variable 72 if ((topslot < 0) || ((fd < 0) && 73 (fd = open(_PATH_UTMP, O_RDWR|O_CREAT, 0644)) == -1)) 79 (void)lseek(fd, (off_t)topslot * sizeof(struct utmp), SEEK_SET); 82 if (read(fd, &ubuf, sizeof(struct utmp)) == 85 (void)lseek(fd, -(off_t)sizeof(struct utmp), 91 (void)lseek(fd, (off_t)topslot * sizeof(struct utmp), 97 (void)write(fd, ut, sizeof(struct utmp)); 108 if (fd < 0) 111 (void)lseek(fd, [all...] |
H A D | logwtmp.c | 49 static int fd = -1; variable 63 if (fd < 0 && (fd = open(_PATH_WTMP, O_WRONLY|O_APPEND)) == -1) 65 if (fstat(fd, &buf) == 0) { 71 if (write(fd, (char *)&ut, sizeof(struct utmp)) != 73 (void)ftruncate(fd, buf.st_size);
|
/openbsd-current/sys/miscfs/fuse/ |
H A D | fuse_device.c | 133 struct fuse_d *fd; local 135 LIST_FOREACH(fd, &fuse_d_list, fd_list) 136 if (fd->fd_unit == unit) 137 return (fd); 147 struct fuse_d *fd; local 150 fd = fuse_lookup(minor(dev)); 151 if (fd == NULL) 156 rw_enter_write(&fd->fd_lock); 157 SIMPLEQ_FOREACH_SAFE(f, &fd->fd_fbufs_in, fb_next, ftmp) { 160 SIMPLEQ_REMOVE_HEAD(&fd 192 struct fuse_d *fd; local 208 struct fuse_d *fd; local 226 struct fuse_d *fd; local 251 struct fuse_d *fd; local 287 struct fuse_d *fd; local 404 struct fuse_d *fd; local 460 struct fuse_d *fd; local 537 struct fuse_d *fd; local 565 struct fuse_d *fd = kn->kn_hook; local 574 struct fuse_d *fd = kn->kn_hook; local 588 struct fuse_d *fd = kn->kn_hook; local 601 struct fuse_d *fd = kn->kn_hook; local [all...] |
/openbsd-current/gnu/gcc/gcc/config/i386/ |
H A D | host-cygwin.c | 30 static void * cygwin_gt_pch_get_address (size_t, int fd); 52 cygwin_gt_pch_get_address (size_t sz, int fd) argument 55 off_t p = lseek(fd, 0, SEEK_CUR); 64 if ( ftruncate (fd, sz) == -1 ) 68 base = mmap (NULL, sz, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); 75 if (lseek (fd, p, SEEK_SET) == (off_t) -1 )
|
/openbsd-current/lib/libc/sys/ |
H A D | w_fcntl.c | 23 fcntl(int fd, int cmd, ...) argument 35 ret = HIDDEN(fcntl)(fd, cmd, va_arg(ap, int)); 41 ret = HIDDEN(fcntl)(fd, cmd); 45 ret = HIDDEN(fcntl)(fd, cmd, va_arg(ap, struct flock *)); 49 ret = HIDDEN(fcntl)(fd, cmd, va_arg(ap, struct flock *)); 53 ret = HIDDEN(fcntl)(fd, cmd, va_arg(ap, void *));
|
/openbsd-current/regress/lib/libc/stdio_threading/fgetln/ |
H A D | fgetln_test.c | 47 int fd, i; local 50 if ((fd = mkstemp(sfn)) == -1 || 51 (sfp = fdopen(fd, "w+")) == NULL) { 53 if (fd != -1) { 55 close(fd); 67 close(fd);
|
/openbsd-current/regress/lib/libc/stdio_threading/fgets/ |
H A D | fgets_test.c | 46 int fd, i; local 49 if ((fd = mkstemp(sfn)) == -1 || 50 (sfp = fdopen(fd, "w+")) == NULL) { 52 if (fd != -1) { 54 close(fd); 66 close(fd);
|
/openbsd-current/regress/lib/libc/stdio_threading/fputs/ |
H A D | fputs_test.c | 44 int fd; local 47 if ((fd = mkstemp(sfn)) == -1 || 48 (sfp = fdopen(fd, "w+")) == NULL) { 50 if (fd != -1) { 52 close(fd); 64 close(fd);
|
/openbsd-current/regress/lib/libc/stdio_threading/fread/ |
H A D | fread_test.c | 48 int fd, i; local 51 if ((fd = mkstemp(sfn)) == -1 || 52 (sfp = fdopen(fd, "w+")) == NULL) { 54 if (fd != -1) { 56 close(fd); 68 close(fd);
|
/openbsd-current/regress/lib/libc/stdio_threading/fwrite/ |
H A D | fwrite_test.c | 44 int fd; local 47 if ((fd = mkstemp(sfn)) == -1 || 48 (sfp = fdopen(fd, "w+")) == NULL) { 50 if (fd != -1) { 52 close(fd); 64 close(fd);
|
/openbsd-current/lib/libc/stdio/ |
H A D | tmpfile.c | 47 int fd, sverrno; local 53 fd = mkstemp(buf); 54 if (fd != -1) 59 if (fd == -1) 62 if ((fp = fdopen(fd, "w+")) == NULL) { 64 (void)close(fd);
|
/openbsd-current/lib/libutil/ |
H A D | logout.c | 47 int fd, rval; local 50 if ((fd = open(_PATH_UTMP, O_RDWR|O_CLOEXEC)) == -1) 53 while (read(fd, &ut, sizeof(UTMP)) == sizeof(UTMP)) { 59 (void)lseek(fd, -(off_t)sizeof(UTMP), SEEK_CUR); 60 (void)write(fd, &ut, sizeof(UTMP)); 63 (void)close(fd);
|
H A D | logwtmp.c | 47 int fd; local 49 if ((fd = open(_PATH_WTMP, O_WRONLY|O_APPEND|O_CLOEXEC)) == -1) 51 if (fstat(fd, &buf) == 0) { 56 if (write(fd, &ut, sizeof(struct utmp)) != 58 (void) ftruncate(fd, buf.st_size); 60 (void) close(fd);
|
/openbsd-current/usr.sbin/mopd/common/ |
H A D | pf.c | 78 int fd; local 98 if ((fd = open("/dev/bpf", mode)) == -1) { 105 if (ioctl(fd, BIOCIMMEDIATE, &immediate) < 0) { 110 if (ioctl(fd, BIOCSETIF, &ifr) < 0) { 116 if (ioctl(fd, BIOCGDLT, &dlt) < 0) { 126 if (ioctl(fd, BIOCPROMISC, 0) < 0) { 135 if (ioctl(fd, BIOCSETF, &filter) < 0) { 141 if (ioctl(fd, BIOCSETWF, &filter) < 0) { 147 if (ioctl(fd, BIOCLOCK) < 0) { 152 return (fd); 162 int fd; local 194 int fd; local 224 pfRead(int fd, u_char *buf, int len) argument 233 pfWrite(int fd, u_char *buf, int len, int trans) argument [all...] |
/openbsd-current/gnu/llvm/lldb/include/lldb/Utility/ |
H A D | SelectHelper.h | 33 // cause FD_SET() to be called prior to calling select using the "fd" 35 void FDSetRead(lldb::socket_t fd); 36 void FDSetWrite(lldb::socket_t fd); 37 void FDSetError(lldb::socket_t fd); 43 bool FDIsSetRead(lldb::socket_t fd) const; 44 bool FDIsSetWrite(lldb::socket_t fd) const; 45 bool FDIsSetError(lldb::socket_t fd) const;
|
/openbsd-current/gnu/llvm/compiler-rt/lib/tsan/rtl/ |
H A D | tsan_fd.cpp | 51 static bool bogusfd(int fd) { argument 52 // Apparently a bogus fd value. 53 return fd < 0 || fd >= kTableSize; 80 static FdDesc *fddesc(ThreadState *thr, uptr pc, int fd) { argument 81 CHECK_GE(fd, 0); 82 CHECK_LT(fd, kTableSize); 83 atomic_uintptr_t *pl1 = &fdctx.tab[fd / kTableSizeL2]; 97 return &fds[fd % kTableSizeL2]; 101 static void init(ThreadState *thr, uptr pc, int fd, FdSyn argument 160 FdLocation(uptr addr, int *fd, Tid *tid, StackID *stack, bool *closed) argument 178 FdAcquire(ThreadState *thr, uptr pc, int fd) argument 189 FdRelease(ThreadState *thr, uptr pc, int fd) argument 202 FdAccess(ThreadState *thr, uptr pc, int fd) argument 210 FdClose(ThreadState *thr, uptr pc, int fd, bool write) argument 253 FdFileCreate(ThreadState *thr, uptr pc, int fd) argument 279 FdEventCreate(ThreadState *thr, uptr pc, int fd) argument 286 FdSignalCreate(ThreadState *thr, uptr pc, int fd) argument 293 FdInotifyCreate(ThreadState *thr, uptr pc, int fd) argument 300 FdPollCreate(ThreadState *thr, uptr pc, int fd) argument 307 FdPollAdd(ThreadState *thr, uptr pc, int epfd, int fd) argument 331 FdSocketCreate(ThreadState *thr, uptr pc, int fd) argument 339 FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd) argument 348 FdSocketConnecting(ThreadState *thr, uptr pc, int fd) argument 356 FdSocketConnect(ThreadState *thr, uptr pc, int fd) argument [all...] |
/openbsd-current/lib/libc/gen/ |
H A D | shm_open.c | 51 int fd; local 64 fd = HIDDEN(open)(shmpath, flags, mode); 65 if (fd == -1) 67 if (fstat(fd, &sb) == -1 || !S_ISREG(sb.st_mode)) { 68 HIDDEN(close)(fd); 73 HIDDEN(close)(fd); 77 return fd; 95 int i, fd; local 103 fd = -1; 108 fd [all...] |
H A D | closedir.c | 44 int fd; local 47 fd = dirp->dd_fd; 53 return (close(fd));
|
/openbsd-current/usr.bin/ssh/ |
H A D | sshbuf-io.c | 30 /* Load a file from a fd into a buffer */ 32 sshbuf_load_fd(int fd, struct sshbuf **blobp) argument 42 if (fstat(fd, &st) == -1) 50 if ((len = atomicio(read, fd, buf, sizeof(buf))) == 0) { 81 int r, fd, oerrno; local 84 if ((fd = open(path, O_RDONLY)) == -1) 86 if ((r = sshbuf_load_fd(fd, bufp)) != 0) 92 close(fd); 101 int fd, oerrno; local 103 if ((fd [all...] |
/openbsd-current/regress/usr.sbin/bgpd/integrationtests/ |
H A D | api-exabgp.c | 20 int fd; local 22 fd = open(name, O_RDONLY | O_NONBLOCK); 23 if (fd == -1) 25 return fd; 34 int fd, ch, timeout = 0; local 56 pfd[0].fd = 0; 58 pfd[1].fd = fd = fifo_open(fifo); 83 n = read(fd, buf, sizeof(buf)); 93 close(fd); [all...] |
/openbsd-current/sys/lib/libsa/ |
H A D | fchmod.c | 38 fchmod(int fd, mode_t m) argument 40 struct open_file *f = &files[fd]; 46 if ((unsigned)fd >= SOPEN_MAX || f->f_flags == 0) {
|