Searched refs:fd (Results 151 - 175 of 1892) sorted by relevance

1234567891011>>

/openbsd-current/lib/libcrypto/des/
H A Denc_read.c72 DES_enc_read(int fd, void *buf, int len, DES_key_schedule *sched, argument
80 DES_enc_write(int fd, const void *_buf, int len, argument
/openbsd-current/usr.sbin/rdate/
H A Dntpleaps.c120 int fd; local
127 fd = open("/usr/share/zoneinfo/right/UTC", O_RDONLY | O_NDELAY);
128 if (fd == -1)
132 read(fd, buf, 4);
135 close(fd);
146 read(fd, buf, 28);
152 close(fd);
156 close(fd);
161 read(fd, buf, 12);
166 lseek(fd, (off_
[all...]
/openbsd-current/usr.bin/login/
H A Dfailedlogin.c55 int fd; local
58 if ((fd = open(_PATH_FAILEDLOGIN, O_RDWR)) >= 0) {
59 (void)lseek(fd, (off_t)uid * sizeof(failedlogin), SEEK_SET);
62 if (read(fd, (char *)&failedlogin, sizeof(failedlogin)) !=
66 (void)lseek(fd, (off_t)uid * sizeof(failedlogin), SEEK_SET);
79 (void)write(fd, (char *)&failedlogin, sizeof(failedlogin));
80 (void)close(fd);
94 int fd, was_bad = 0; local
98 if ((fd = open(_PATH_FAILEDLOGIN, O_RDWR)) >= 0) {
99 (void)lseek(fd, (off_
[all...]
/openbsd-current/regress/sys/fifofs/
H A Dfifotest.c86 int fd; local
97 if ((fd = open(fifo, O_RDWR | flags)) == -1) {
107 dopoll(-1, fd, POLLIN|POLLOUT, "POLLIN|POLLOUT", timeout);
108 dopoll(-1, fd, POLLIN, "POLLIN", timeout);
109 dopoll(-1, fd, POLLOUT, "POLLOUT", timeout);
110 dopoll(-1, fd, 0, "(none)", timeout);
111 doselect(-1, fd, fd, timeout);
112 doselect(-1, fd, -1, timeout);
113 doselect(-1, -1, fd, timeou
142 int fd; local
191 int fd = -1, pass, status; local
282 dopoll(pid_t writer, int fd, int events, char *str, int timeout) argument
[all...]
/openbsd-current/gnu/usr.bin/cvs/vms/
H A Dstartserver.c17 int fd, port; local
45 fd = rcmd(&server_host, port,
50 if (fd < 0)
53 *tofd = fd;
54 *fromfd = fd;
/openbsd-current/sys/dev/microcode/ral/
H A Dbuild.c33 int fd; local
37 fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
38 if (fd == -1)
41 rlen = write(fd, ucode, size);
47 close(fd);
/openbsd-current/sys/dev/microcode/neomagic/
H A Dbuild.c35 int fd; local
37 fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0644);
38 if (fd == -1)
46 rlen = write(fd, &nf, sizeof nf);
52 close(fd);
/openbsd-current/regress/sys/kern/descrip/
H A Ddescrip.c31 int fd, kq, status; local
37 fd = open("/etc/hosts", O_RDONLY);
38 assert(fd == 4);
43 * The existing kq fd should have been closed across fork,
44 * hence we expect fd 3 to be reallocated on this kqueue call.
50 * fd 4 should still be open and allocated across fork,
51 * hence opening another file should result in fd 5 being
54 fd = open("/etc/hosts", O_RDONLY);
55 assert(fd == 5);
/openbsd-current/sys/dev/microcode/rtwn/
H A Dbuild.c33 int fd; local
37 fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
38 if (fd == -1)
41 rlen = write(fd, ucode, size);
47 close(fd);
/openbsd-current/sys/dev/microcode/urtwn/
H A Dbuild.c33 int fd; local
37 fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
38 if (fd == -1)
41 rlen = write(fd, ucode, size);
47 close(fd);
/openbsd-current/regress/lib/libc/sys/
H A Dt_pipe2.c52 int fd[2], i; local
60 ATF_REQUIRE(pipe2(fd, flags) == 0);
62 ATF_REQUIRE(fd[0] == 3);
63 ATF_REQUIRE(fd[1] == 4);
66 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) != 0);
67 ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) != 0);
69 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) == 0);
70 ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) == 0);
74 ATF_REQUIRE((fcntl(fd[0], F_GETFL) & O_NONBLOCK) != 0);
75 ATF_REQUIRE((fcntl(fd[
181 int fd[2]; local
[all...]
H A Dt_write.c67 int fd; local
72 fd = open(path, O_RDWR | O_CREAT, 0600);
74 if (fd >= 0) {
77 ATF_REQUIRE_ERRNO(0, write(fd, wbuf, 3) == 3);
80 ATF_REQUIRE_ERRNO(EINVAL, write(fd, wbuf, SIZE_MAX) == -1);
83 ATF_REQUIRE_ERRNO(EFAULT, write(fd, (void *)-1, 1) == -1);
89 ATF_REQUIRE(lseek(fd, 0, SEEK_SET) == 0);
90 ATF_REQUIRE(read(fd, rbuf, 3) == 3);
93 (void)close(fd);
142 int fd; local
172 int fd; local
228 int fd[2]; local
255 int fd = open(_PATH_DEVZERO, O_RDONLY); local
[all...]
/openbsd-current/usr.sbin/tcpdump/
H A Dprivsep.c118 static void impl_localtime(int fd);
366 impl_open_bpf(int fd, int *bpfd) argument
375 must_read(fd, &snaplen, sizeof(int));
376 must_read(fd, &promisc, sizeof(int));
377 must_read(fd, &dlt, sizeof(u_int));
378 must_read(fd, &dirfilt, sizeof(u_int));
379 must_read(fd, &fildrop, sizeof(fildrop));
380 iflen = read_string(fd, device, sizeof(device), __func__);
389 send_fd(fd, *bpfd);
390 must_write(fd,
395 impl_open_dump(int fd, const char *RFileName) argument
418 impl_open_pfosfp(int fd) argument
436 impl_open_output(int fd, const char *WFileName) argument
454 impl_setfilter(int fd, char *cmdbuf, int *bpfd) argument
463 impl_init_done(int fd, int *bpfd) argument
474 impl_gethostbyaddr(int fd) argument
496 impl_ether_ntohost(int fd) argument
512 impl_getrpcbynumber(int fd) argument
528 impl_getserventries(int fd) argument
549 impl_getprotoentries(int fd) argument
571 impl_localtime(int fd) argument
597 impl_pcap_stats(int fd, int *bpfd) argument
771 int fd, err = 0; local
786 may_read(int fd, void *buf, size_t n) argument
810 must_read(int fd, void *buf, size_t n) argument
833 must_write(int fd, const void *buf, size_t n) argument
891 write_command(int fd, int cmd) argument
898 write_zero(int fd) argument
906 write_string(int fd, const char *str) argument
917 write_block(int fd, size_t size, const char *str) argument
926 read_string(int fd, char *buf, size_t size, const char *func) argument
943 read_block(int fd, char *buf, size_t size, const char *func) argument
[all...]
/openbsd-current/gnu/gcc/libssp/
H A Dssp.c65 int fd; local
70 fd = open ("/dev/urandom", O_RDONLY);
71 if (fd != -1)
73 ssize_t size = read (fd, &__stack_chk_guard,
75 close (fd);
96 int fd; local
100 fd = open (_PATH_TTY, O_WRONLY);
101 if (fd != -1)
119 ssize_t wrote = write (fd, buf, len);
125 close (fd);
[all...]
/openbsd-current/regress/sys/uvm/vnode/
H A Dtest-deadlock.c89 int fd; local
95 fd = open(path, O_RDWR | O_TRUNC);
96 if (fd == -1)
100 if (ftruncate(fd, npages * PAGE_SIZE) == -1)
104 fd, 0);
113 close(fd);
120 int fd; local
123 fd = open(path, O_RDONLY);
124 if (fd == -1)
127 fd,
[all...]
/openbsd-current/regress/sys/nfs/
H A Dmmap-sysctl-copyout.c34 int fd; local
42 if ((fd = open(path, O_RDWR|O_CREAT|O_TRUNC, 0777)) == -1)
46 if ((n = write(fd, &stats, len)) == -1)
50 if (close(fd) == -1)
57 if ((fd = open(path, O_RDWR)) == -1)
59 p = mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
66 if (close(fd) == -1)
73 if ((fd = open(path, O_RDONLY)) == -1)
75 if ((n = read(fd, &stats, len)) == -1)
79 if (close(fd)
[all...]
/openbsd-current/usr.bin/rsync/
H A Dio.c32 * A non-blocking check to see whether there's POLLIN data in fd.
36 io_read_check(int fd) argument
40 pfd.fd = fd;
56 io_write_nonblocking(int fd, const void *buf, size_t bsz, argument
68 pfd.fd = fd;
80 ERRX("poll: bad fd");
92 if ((wsz = write(fd, buf, bsz)) == -1) {
106 io_write_blocking(int fd, cons argument
133 io_write_buf(struct sess *sess, int fd, const void *buf, size_t sz) argument
170 io_write_line(struct sess *sess, int fd, const char *line) argument
188 io_read_nonblocking(int fd, void *buf, size_t bsz, size_t *sz) argument
239 io_read_blocking(int fd, void *buf, size_t sz) argument
272 io_read_flush(struct sess *sess, int fd) argument
339 io_read_buf(struct sess *sess, int fd, void *buf, size_t sz) argument
390 io_write_ulong(struct sess *sess, int fd, uint64_t val) argument
420 io_write_long(struct sess *sess, int fd, int64_t val) argument
430 io_write_uint(struct sess *sess, int fd, uint32_t val) argument
448 io_write_int(struct sess *sess, int fd, int32_t val) argument
557 io_read_long(struct sess *sess, int fd, int64_t *val) argument
578 io_read_ulong(struct sess *sess, int fd, uint64_t *val) argument
613 io_read_size(struct sess *sess, int fd, size_t *val) argument
634 io_read_uint(struct sess *sess, int fd, uint32_t *val) argument
648 io_read_int(struct sess *sess, int fd, int32_t *val) argument
703 io_read_byte(struct sess *sess, int fd, uint8_t *val) argument
718 io_write_byte(struct sess *sess, int fd, uint8_t val) argument
[all...]
/openbsd-current/usr.bin/compress/
H A Dnullopen.c41 int fd; member in struct:__anon10168
50 null_ropen(int fd, char *name, int gotmagic) argument
54 if (fd < 0)
60 s->fd = fd;
69 null_wopen(int fd, char *name, int bits, u_int32_t mtime) argument
73 if (fd < 0)
79 s->fd = fd;
105 setfile(name, s->fd, s
[all...]
/openbsd-current/lib/libutil/
H A Dreadlabel.c58 int fd = -1; local
62 if ((fd = open("/dev/diskmap", O_RDONLY|O_CLOEXEC)) != -1) {
67 dm.fd = fd;
69 if (ioctl(fd, DIOCMAP, &dm) == -1)
70 close(fd);
108 fd = open(rpath, O_RDONLY|O_CLOEXEC);
109 if (fd == -1) {
113 fd = open(rpath, O_RDONLY|O_CLOEXEC);
114 if (fd
[all...]
/openbsd-current/lib/libcurses/
H A Dnc_termios.h58 #define tcsetattr(fd, cmd, arg) ioctl(fd, cmd, arg)
61 #define tcgetattr(fd, arg) ioctl(fd, TCGETA, arg)
70 #define tcflush(fd, arg) ioctl(fd, TCFLSH, arg)
149 #define tcsetattr(fd, opt, arg) _nc_mingw_tcsetattr(fd, opt, arg)
153 #define tcgetattr(fd, arg) _nc_mingw_tcgetattr(fd, ar
[all...]
/openbsd-current/usr.sbin/rad/
H A Dcontrol.c45 int fd; member in struct:__anon156
46 } control_state = {.fd = -1};
63 int fd; local
66 if ((fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK,
79 close(fd);
84 if (bind(fd, (struct sockaddr *)&sun, sizeof(sun)) == -1) {
86 close(fd);
94 close(fd);
99 return (fd);
103 control_listen(int fd) argument
169 control_connbyfd(int fd) argument
195 control_close(int fd) argument
220 control_dispatch_imsg(int fd, short event, void *bula) argument
[all...]
/openbsd-current/sbin/slaacd/
H A Dcontrol.c47 int fd; member in struct:__anon2
48 } control_state = {.fd = -1};
65 int fd; local
68 if ((fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK,
81 close(fd);
86 if (bind(fd, (struct sockaddr *)&sun, sizeof(sun)) == -1) {
88 close(fd);
96 close(fd);
101 return (fd);
105 control_listen(int fd) argument
171 control_connbyfd(int fd) argument
197 control_close(int fd) argument
222 control_dispatch_imsg(int fd, short event, void *bula) argument
[all...]
/openbsd-current/sbin/dhcpleased/
H A Dcontrol.c46 int fd; member in struct:__anon1
47 } control_state = {.fd = -1};
64 int fd; local
67 if ((fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK,
80 close(fd);
85 if (bind(fd, (struct sockaddr *)&sun, sizeof(sun)) == -1) {
87 close(fd);
95 close(fd);
100 return (fd);
104 control_listen(int fd) argument
170 control_connbyfd(int fd) argument
196 control_close(int fd) argument
221 control_dispatch_imsg(int fd, short event, void *bula) argument
[all...]
/openbsd-current/sbin/dhcp6leased/
H A Dcontrol.c46 int fd; member in struct:__anon3
47 } control_state = {.fd = -1};
64 int fd; local
67 if ((fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK,
80 close(fd);
85 if (bind(fd, (struct sockaddr *)&sun, sizeof(sun)) == -1) {
87 close(fd);
95 close(fd);
100 return (fd);
104 control_listen(int fd) argument
170 control_connbyfd(int fd) argument
196 control_close(int fd) argument
221 control_dispatch_imsg(int fd, short event, void *bula) argument
[all...]
/openbsd-current/sys/arch/sparc64/dev/
H A Dfd.c1 /* $OpenBSD: fd.c,v 1.53 2024/05/13 01:15:50 jsg Exp $ */
2 /* $NetBSD: fd.c,v 1.112 2003/08/07 16:29:35 agc Exp $ */
64 * @(#)fd.c 7.4 (Berkeley) 5/25/91
102 * @(#)fd.c 7.4 (Berkeley) 5/25/91
285 NULL, "fd", DV_DISK
309 void fdfinish(struct fd_softc *fd, struct buf *bp);
622 struct fd_softc *fd = (void *)self; local
627 timeout_set(&fd->sc_motoron_to, fd_motor_on, fd);
628 timeout_set(&fd
673 fd_dev_to_type(struct fd_softc *fd, dev_t dev) argument
685 struct fd_softc *fd; local
761 fdstart(struct fd_softc *fd) argument
776 fdfinish(struct fd_softc *fd, struct buf *bp) argument
825 struct fd_softc *fd; local
843 struct fd_softc *fd = arg; local
855 struct fd_softc *fd = arg; local
935 struct fd_softc *fd; local
982 struct fd_softc *fd = fd_cd.cd_devs[FDUNIT(dev)]; local
1035 struct fd_softc *fd = TAILQ_FIRST(&fdc->sc_drives); local
1080 struct fd_softc *fd; local
1238 struct fd_softc *fd; local
1681 struct fd_softc *fd; local
1769 struct fd_softc *fd; local
1893 struct fd_softc *fd = fd_cd.cd_devs[FDUNIT(dev)]; local
1952 fdgetdisklabel(dev_t dev, struct fd_softc *fd, struct disklabel *lp, int spoofonly) argument
1981 fd_do_eject(struct fd_softc *fd) argument
[all...]

Completed in 318 milliseconds

1234567891011>>