Searched refs:fd (Results 26 - 50 of 1892) sorted by relevance

1234567891011>>

/openbsd-current/usr.sbin/rad/
H A Dcontrol.h20 int control_listen(int fd);
/openbsd-current/usr.sbin/ldpd/
H A Dsocket.c37 int fd, domain, proto; local
56 fd = socket(af, domain | SOCK_NONBLOCK | SOCK_CLOEXEC, proto);
57 if (fd == -1) {
75 if (sock_set_bindany(fd, 1) == -1) {
76 close(fd);
81 if (sock_set_reuse(fd, 1) == -1) {
82 close(fd);
85 if (bind(fd, (struct sockaddr *)&local_sa, local_sa.ss_len) == -1) {
87 close(fd);
94 if (sock_set_ipv4_tos(fd, IPTOS_PREC_INTERNETCONTRO
184 sock_set_recvbuf(int fd) argument
195 sock_set_reuse(int fd, int enable) argument
207 sock_set_bindany(int fd, int enable) argument
219 sock_set_ipv4_tos(int fd, int tos) argument
230 sock_set_ipv4_recvif(int fd, int enable) argument
241 sock_set_ipv4_minttl(int fd, int ttl) argument
252 sock_set_ipv4_ucast_ttl(int fd, int ttl) argument
263 sock_set_ipv4_mcast_ttl(int fd, uint8_t ttl) argument
293 sock_set_ipv4_mcast_loop(int fd) argument
307 sock_set_ipv6_dscp(int fd, int dscp) argument
319 sock_set_ipv6_pktinfo(int fd, int enable) argument
331 sock_set_ipv6_minhopcount(int fd, int hoplimit) argument
343 sock_set_ipv6_ucast_hops(int fd, int hoplimit) argument
355 sock_set_ipv6_mcast_hops(int fd, int hoplimit) argument
380 sock_set_ipv6_mcast_loop(int fd) argument
[all...]
/openbsd-current/games/hack/
H A Dhack.lev.c83 savelev(int fd, xchar lev) argument
90 if (fd < 0)
95 bwrite(fd, &hackpid,sizeof(hackpid));
96 bwrite(fd, &lev,sizeof(lev));
97 bwrite(fd, levl,sizeof(levl));
98 bwrite(fd, &moves,sizeof(long));
99 bwrite(fd, &xupstair,sizeof(xupstair));
100 bwrite(fd, &yupstair,sizeof(yupstair));
101 bwrite(fd, &xdnstair,sizeof(xdnstair));
102 bwrite(fd,
132 bwrite(int fd, const void *loc, ssize_t num) argument
139 saveobjchn(int fd, struct obj *otmp) argument
157 savemonchn(int fd, struct monst *mtmp) argument
179 savegoldchn(int fd, struct gold *gold) argument
192 savetrapchn(int fd, struct trap *trap) argument
205 getlev(int fd, int pid, xchar lev) argument
308 mread(int fd, char *buf, unsigned len) argument
[all...]
H A Dhack.save.c99 int fd, ofd; local
104 if((fd = open(SAVEF, O_CREAT | O_TRUNC | O_WRONLY, FMASK)) == -1) {
111 savelev(fd,dlevel);
112 saveobjchn(fd, invent);
113 saveobjchn(fd, fcobj);
114 savemonchn(fd, fallen_down);
116 bwrite(fd, &tmp, sizeof tmp);
117 bwrite(fd, &flags, sizeof(struct flag));
118 bwrite(fd, &dlevel, sizeof dlevel);
119 bwrite(fd,
156 dorecover(int fd) argument
238 restobjchn(int fd) argument
261 restmonchn(int fd) argument
[all...]
/openbsd-current/gnu/usr.bin/gcc/gcc/testsuite/gcc.c-torture/execute/
H A D20030307-1.c8 int fcntl_lock(int fd, int op, long long offset, long long count, int type);
10 int vfswrap_lock(char *fsp, int fd, int op, long long offset, long long count, int type) argument
12 return fcntl_lock(fd, op, offset, count, type);
15 int fcntl_lock(int fd, int op, long long offset, long long count, int type) argument
/openbsd-current/usr.sbin/mopd/common/
H A Ddl.c33 mopDumpDL(FILE *fd, u_char *pkt, int trans) argument
56 fprintf(fd, "Load Number : %02x\n", tmpc);
60 fprintf(fd, "Load Address : %08lx\n", tmpl);
67 fprintf(fd,
71 fprintf(fd,
75 fprintf(fd, "%02x ", mopGetChar(pkt, &idx));
77 fprintf(fd, "\n");
81 fprintf(fd, "\n");
85 fprintf(fd, "Xfer Address : %08lx\n", tmpl);
92 fprintf(fd, "Loa
[all...]
/openbsd-current/regress/sys/dev/fdesc/
H A Dconfuse.c18 int fd, newfd; local
20 if ((fd = open("/dev/null", O_RDONLY)) < 0)
24 close(fd);
26 snprintf(fname, sizeof(fname), "/dev/fd/%d", fd);
28 if ((newfd = open(fname, O_RDONLY)) == fd)
29 errx(1, "open of %s to %d succeeded, beware.", fname, fd);
32 errx(1, "open(%s) gave us the unexpected %d", fname, fd);
/openbsd-current/gnu/llvm/compiler-rt/lib/tsan/rtl/
H A Dtsan_fd.h41 void FdAcquire(ThreadState *thr, uptr pc, int fd);
42 void FdRelease(ThreadState *thr, uptr pc, int fd);
43 void FdAccess(ThreadState *thr, uptr pc, int fd);
44 void FdClose(ThreadState *thr, uptr pc, int fd, bool write = true);
45 void FdFileCreate(ThreadState *thr, uptr pc, int fd);
48 void FdEventCreate(ThreadState *thr, uptr pc, int fd);
49 void FdSignalCreate(ThreadState *thr, uptr pc, int fd);
50 void FdInotifyCreate(ThreadState *thr, uptr pc, int fd);
51 void FdPollCreate(ThreadState *thr, uptr pc, int fd);
52 void FdPollAdd(ThreadState *thr, uptr pc, int epfd, int fd);
[all...]
/openbsd-current/regress/sys/kern/mmap3/
H A Dmmaptest.c44 int fd; local
50 fd = open("test.out", O_WRONLY|O_CREAT|O_TRUNC, 0600);
51 if (fd == -1)
53 if (write(fd, area, AREA) != AREA)
55 if (close(fd))
57 fd = open("test.out", O_RDWR);
58 if (fd == -1)
60 a2 = mmap(NULL, AREA, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
67 if (ftruncate(fd, 128))
71 if (close(fd))
[all...]
/openbsd-current/regress/sys/kern/pread/
H A Dpread.c19 int fd, ret; local
21 if ((fd = mkstemp(temp)) < 0)
25 if (write(fd, magic, sizeof(magic)) != sizeof(magic))
28 if (lseek(fd, 0, SEEK_SET) != 0)
31 if (read(fd, &c, 1) != 1)
37 if (pread(fd, &c, 1, 7) != 1)
43 if (read(fd, &c, 1) != 1)
49 if ((ret = pread(fd, &c, 1, -1)) != -1)
55 if ((ret = pread(fd, &c, 3, LLONG_MAX)) != -1)
61 if (read(fd,
[all...]
/openbsd-current/regress/sys/kern/pwritev/
H A Dpwritev.c25 int fd, ret; local
27 if ((fd = mkstemp(temp)) < 0)
31 if (write(fd, zeroes, sizeof(zeroes)) != sizeof(zeroes))
34 if (lseek(fd, 5, SEEK_SET) != 5)
42 if (pwritev(fd, iov, 2, 4) != 4)
45 if (read(fd, &c, 1) != 1)
52 if (write(fd, &c, 1) != 1)
55 if (pread(fd, buf, 10, 0) != 10)
60 if ((ret = pwritev(fd, iov, 2, -1)) != -1)
66 if ((ret = pwritev(fd, io
[all...]
/openbsd-current/regress/lib/libc/sys/
H A Dt_socketpair.c51 connected(int fd) argument
55 ATF_REQUIRE(getpeername(fd, (struct sockaddr*)(void *)&addr,
62 int fd[2], i; local
69 ATF_REQUIRE(socketpair(AF_UNIX, SOCK_DGRAM | flags, 0, fd) == 0);
71 ATF_REQUIRE(fd[0] == 3);
72 ATF_REQUIRE(fd[1] == 4);
74 connected(fd[0]);
75 connected(fd[1]);
78 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) != 0);
79 ATF_REQUIRE((fcntl(fd[
[all...]
H A Dt_fsync.c53 int i, fd[2]; local
57 * when the 'fd' is not a valid descriptor.
72 ATF_REQUIRE(pipe(fd) == 0);
76 ATF_REQUIRE(fsync(fd[0]) == -1);
81 ATF_REQUIRE(fsync(fd[1]) == -1);
84 ATF_REQUIRE(close(fd[0]) == 0);
85 ATF_REQUIRE(close(fd[1]) == 0);
97 int fd, i; local
104 fd = open(buf, O_CREAT|O_EXCL|O_RDWR, 0600);
106 fd
[all...]
/openbsd-current/regress/lib/libpthread/closefrom/
H A Dclosefrom.c27 int fd; local
31 fd = STDERR_FILENO + 1;
32 result = closefrom(fd);
33 printf("closefrom(%d) == %d/%d\n", fd, result, errno);
36 result = closefrom(fd);
37 printf("closefrom(%d) == %d/%d\n", fd, result, errno);
/openbsd-current/regress/sys/kern/select/
H A Dselect_iocond.c299 proc_barrier(int fd) argument
304 ret = write(fd, &b, 1);
306 ret = read(fd, &b, 1);
311 fdset_init(fd_set *rfd, fd_set *wfd, fd_set *efd, int fd) argument
316 FD_SET(fd, rfd);
317 FD_SET(fd, wfd);
318 FD_SET(fd, efd);
322 proc_child(int fd, int bfd) argument
334 fdset_init(&rfd, &wfd, &efd, fd);
335 ret = select(fd
483 proc_parent(int fd, int bfd) argument
[all...]
/openbsd-current/sys/dev/isa/
H A Dfd.c1 /* $OpenBSD: fd.c,v 1.109 2024/05/13 01:15:50 jsg Exp $ */
2 /* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */
42 * @(#)fd.c 7.4 (Berkeley) 5/25/91
137 NULL, "fd", DV_DISK
148 void fdfinish(struct fd_softc *fd, struct buf *bp);
155 fdgetdisklabel(dev_t dev, struct fd_softc *fd, struct disklabel *lp, argument
161 lp->d_secsize = FD_BSIZE(fd);
162 lp->d_secpercyl = fd->sc_type->seccyl;
163 lp->d_nsectors = fd->sc_type->sectrac;
164 lp->d_ncylinders = fd
247 struct fd_softc *fd = (void *)self; local
312 struct fd_softc *fd = (void *)self; local
373 fd_dev_to_type(struct fd_softc *fd, dev_t dev) argument
385 struct fd_softc *fd = fd_cd.cd_devs[FDUNIT(bp->b_dev)]; local
459 fdstart(struct fd_softc *fd) argument
474 fdfinish(struct fd_softc *fd, struct buf *bp) argument
519 struct fd_softc *fd; local
539 struct fd_softc *fd = arg; local
551 struct fd_softc *fd = arg; local
567 struct fd_softc *fd; local
614 struct fd_softc *fd = fd_cd.cd_devs[FDUNIT(dev)]; local
657 struct fd_softc *fd; local
936 struct fd_softc *fd = arg; local
956 fdretry(struct fd_softc *fd) argument
1000 struct fd_softc *fd = fd_cd.cd_devs[FDUNIT(dev)]; local
1080 struct fd_softc *fd = fd_cd.cd_devs[FDUNIT(dev)]; local
[all...]
/openbsd-current/gnu/gcc/gcc/
H A Dhosthooks.h31 void * (*gt_pch_get_address) (size_t size, int fd);
37 int (*gt_pch_use_address) (void *addr, size_t size, int fd, size_t offset);
/openbsd-current/gnu/gcc/gcc/config/
H A Dhost-darwin.h21 extern void * darwin_gt_pch_get_address (size_t sz, int fd);
22 extern int darwin_gt_pch_use_address (void *addr, size_t sz, int fd,
/openbsd-current/lib/libc/termios/
H A Dtcdrain.c37 tcdrain(int fd) argument
42 ret = ioctl(fd, TIOCDRAIN, 0);
H A Dtcgetattr.c35 tcgetattr(int fd, struct termios *t) argument
37 return (ioctl(fd, TIOCGETA, t));
H A Dtcsetpgrp.c35 tcsetpgrp(int fd, pid_t pgrp) argument
40 return (ioctl(fd, TIOCSPGRP, &s));
/openbsd-current/regress/lib/libsndio/
H A DMakefile3 SUBDIR+= play rec fd cap vol
/openbsd-current/regress/lib/libsndio/fd/
H A DMakefile2 PROG= fd
5 SRCS = fd.c tools.c
/openbsd-current/regress/sys/kern/fchdir/
H A Dfchdir.c21 int fd; local
23 if ((fd = open("/etc/passwd", O_RDONLY)) == -1)
25 if (fchdir(fd) == 0)
29 close(fd);
40 if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
42 if (fchdir(fd) == 0)
46 close(fd);
48 if (fchdir(fd) == 0)
49 errx(1, "fchdir bad fd succeeded");
51 err(1, "fchdir bad fd
[all...]
/openbsd-current/regress/usr.sbin/ospfd/
H A Dtestfd.pl38 open(my $fd, '<', $0)
40 sendfd($child, $fd)
47 my $fd = recvfd($parent)
54 defined (my $line = <$fd>)
55 or die "Read from fd failed: $!";
57 or die "Could not read perl from fd: $line\n";
59 warn "Passing fd successful\n";

Completed in 316 milliseconds

1234567891011>>