Searched refs:fd (Results 226 - 250 of 2333) sorted by relevance

1234567891011>>

/freebsd-11-stable/contrib/netbsd-tests/net/bpf/
H A Dt_div-by-zero.c23 int fd; local
41 fd = rump_sys_open("/dev/bpf", O_RDWR);
42 ATF_CHECK(fd != -1);
43 ATF_REQUIRE_EQ_MSG(rump_sys_ioctl(fd, BIOCSETF, &bp), -1,
/freebsd-11-stable/contrib/netcat/
H A Datomicio.c39 atomicio(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n) argument
46 pfd.fd = fd;
49 res = (f) (fd, s + pos, n - pos);
/freebsd-11-stable/contrib/ntp/sntp/libevent/
H A Devmap-internal.h31 * An event_map is a utility structure to map each fd or signal to zero or
54 underlying eventops about the fd if its state has changed.
59 @param fd the file descriptor corresponding to ev.
62 int evmap_io_add_(struct event_base *base, evutil_socket_t fd, struct event *ev);
65 underlying eventops about the fd if its state has changed.
68 @param fd the file descriptor corresponding to ev.
71 int evmap_io_del_(struct event_base *base, evutil_socket_t fd, struct event *ev);
72 /** Active the set of events waiting on an event_base for a given fd.
75 @param fd the file descriptor that has become active.
78 void evmap_io_active_(struct event_base *base, evutil_socket_t fd, shor
[all...]
/freebsd-11-stable/contrib/libarchive/libarchive/test/
H A Dtest_write_disk_failures.c35 int fd;
44 fd = open("dir/testfile", O_WRONLY | O_CREAT | O_BINARY, 0777);
45 if (fd >= 0) {
47 close(fd);
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/privs/
H A Dtst.fds.ksh31 #define DUMPFIELD(fd, fmt, field) \
33 printf("%d: field =fmt\n", fd, fds[fd].field);
39 #define DUMP(fd) \
40 DUMPFIELD(fd, %s, fi_name); \
41 DUMPFIELD(fd, %s, fi_dirname); \
42 DUMPFIELD(fd, %s, fi_pathname); \
43 DUMPFIELD(fd, %d, fi_offset); \
44 DUMPFIELD(fd, %s, fi_fs); \
45 DUMPFIELD(fd,
[all...]
/freebsd-11-stable/contrib/tcp_wrappers/
H A Dclean_exit.c34 request->sink(request->fd);
/freebsd-11-stable/crypto/heimdal/lib/roken/
H A Dmkstemp.c63 int fd; local
64 fd = open(template, O_RDWR | O_CREAT | O_EXCL, 0600);
65 if(fd >= 0 || errno != EEXIST)
66 return fd;
/freebsd-11-stable/sys/sys/
H A Dmqueue.h43 extern void (*mq_fdclose)(struct thread *td, int fd, struct file *fp);
/freebsd-11-stable/usr.bin/gcore/
H A Dextern.h38 void (*dump)(int efd, int fd, pid_t pid);
/freebsd-11-stable/usr.bin/random/
H A Drandomize_fd.h49 int randomize_fd(int fd, int type, int unique, double denom);
/freebsd-11-stable/contrib/libarchive/tar/test/
H A Dtest_option_fflags.c39 int fd;
41 fd = open(pathname, O_RDONLY | O_NONBLOCK);
42 if (fd < 0)
44 ioctl(fd,
/freebsd-11-stable/contrib/netbsd-tests/rump/rumpvfs/
H A Dt_basic.c60 int fd; local
63 RL(fd = rump_sys_open(TESTFILE, O_RDWR | O_CREAT, 0777));
68 rv = rump_sys_lseek(fd, FIVE_MEGS, SEEK_SET);
71 rv = rump_sys_lseek(fd, FIVE_GIGS, SEEK_SET);
/freebsd-11-stable/contrib/netbsd-tests/dev/scsipi/
H A Dt_cd.c55 int part, fd, arg = 0; local
66 RL(fd = rump_sys_open(fname, O_RDWR));
67 RL(rump_sys_ioctl(fd, DIOCEJECT, &arg));
70 RL(rump_sys_close(fd));
/freebsd-11-stable/contrib/netbsd-tests/fs/vfs/
H A Dt_vfsops.c81 int fd; local
84 fd = rump_sys_open(fpath, O_RDWR | O_CREAT, 0777);
85 if (fd == -1)
88 if (rump_sys_write(fd, MAGICSTR, sizeof(MAGICSTR)) != sizeof(MAGICSTR))
90 rump_sys_close(fd);
110 fd = rump_sys_fhopen(fhp, fhsize, O_RDONLY);
111 if (fd == -1) {
116 if (rump_sys_read(fd, buf, sizeof(buf)) != sizeof(MAGICSTR))
121 rump_sys_close(fd);
130 int fd; local
169 int fd; local
[all...]
/freebsd-11-stable/usr.sbin/bhyve/
H A Dsockstream.c42 stream_read(int fd, void *buf, ssize_t nbytes) argument
51 n = read(fd, p + len, nbytes - len);
66 stream_write(int fd, const void *buf, ssize_t nbytes) argument
75 n = write(fd, p + len, nbytes - len);
/freebsd-11-stable/usr.sbin/lptcontrol/
H A Dlptcontrol.c62 int fd; local
101 if ((fd = open(device, O_WRONLY)) < 0)
103 if (ioctl(fd, LPT_IRQ, &irq_status) < 0)
105 close(fd);
/freebsd-11-stable/usr.bin/fsync/
H A Dfsync.c46 int fd; local
57 if ((fd = open(argv[i], O_RDONLY)) == -1) {
64 if (fsync(fd) == -1) {
69 close(fd);
/freebsd-11-stable/contrib/llvm-project/compiler-rt/lib/dfsan/
H A Ddfsan_interceptors.cpp21 int fd, OFF_T offset) {
22 void *res = REAL(mmap)(addr, length, prot, flags, fd, offset);
29 int fd, OFF64_T offset) {
30 void *res = REAL(mmap64)(addr, length, prot, flags, fd, offset);
20 INTERCEPTOR(void *, mmap, void *addr, SIZE_T length, int prot, int flags, int fd, OFF_T offset) argument
28 INTERCEPTOR(void *, mmap64, void *addr, SIZE_T length, int prot, int flags, int fd, OFF64_T offset) argument
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/baddof/
H A Dbaddof.c55 corrupt(int fd, unsigned char *buf, int len) argument
77 if ((rv = ioctl(fd, DTRACEIOC_ENABLE, buf)) == -1) {
99 close(fd);
106 if (new != fd) {
107 dup2(new, fd);
135 if ((rv = ioctl(fd, DTRACEIOC_ENABLE, buf)) > 0) {
159 int err, fd, len; local
196 fd = open("/devices/pseudo/dtrace@0:dtrace", O_RDWR);
198 if (fd == -1)
201 corrupt(fd, cop
[all...]
/freebsd-11-stable/lib/libc/tests/stdio/
H A Dmkostemp_test.c56 int fd; local
59 fd = mkostemp(tmpf, oflags);
60 if (fd < 0) {
73 if (fcntl(fd, F_GETFD) !=
80 if ((fcntl(fd, F_GETFL) & MISCFLAGS) != (oflags & MISCFLAGS)) {
92 if (fstat(fd, &st2) == -1) {
94 "cannot fstat returned fd %d: %s\n",
95 testnum++, oflags, fd, strerror(errno));
119 if (fstat(fd, &st2) == -1)
121 "cannot fstat returned fd
[all...]
/freebsd-11-stable/lib/libusbhid/
H A Ddescr.c47 hid_set_immed(int fd, int enable) argument
50 ret = ioctl(fd, USB_SET_IMMED, &enable);
53 ret = hid_set_immed_compat7(fd, enable);
59 hid_get_report_id(int fd) argument
68 if ((rep = hid_get_report_desc(fd)) == NULL)
85 ret = ioctl(fd, USB_GET_REPORT_ID, &temp);
88 ret = hid_get_report_id_compat7(fd);
97 hid_get_report_desc(int fd) argument
108 if (ioctl(fd, USB_GET_REPORT_DESC, &ugd) < 0) {
112 return (hid_get_report_desc_compat7(fd));
[all...]
/freebsd-11-stable/lib/libutil/tests/
H A Dflopen_test.c52 int fd; local
55 fd = flopen(fn, O_RDWR|O_CREAT, 0640);
56 if (fd < 0) {
59 close(fd);
73 int fd; local
75 fd = open(fn, O_RDWR|O_CREAT, 0640);
76 if (fd < 0) {
79 close(fd);
80 fd = flopen(fn, O_RDWR);
81 if (fd <
[all...]
/freebsd-11-stable/sbin/dumpon/
H A Ddumpon.c72 check_size(int fd, const char *fn) argument
88 if (ioctl(fd, DIOCGMEDIASIZE, &mediasize) != 0)
127 int i, fd; local
170 fd = open(dumpdev, O_RDONLY);
171 if (fd < 0)
173 check_size(fd, dumpdev);
175 i = ioctl(fd, DIOCSKERNELDUMP, &u);
177 i = ioctl(fd, DIOCSKERNELDUMP, &u);
181 fd = open(_PATH_DEVNULL, O_RDONLY);
182 if (fd <
[all...]
/freebsd-11-stable/contrib/traceroute/
H A Difaddrlist.c72 register int fd, nipaddr; local
85 fd = socket(AF_INET, SOCK_DGRAM, 0);
86 if (fd < 0) {
93 if (ioctl(fd, SIOCGIFCONF, (char *)&ifc) < 0 ||
102 (void)close(fd);
130 if (ioctl(fd, SIOCGIFFLAGS, (char *)&ifr) < 0) {
136 (void)close(fd);
152 if (ioctl(fd, SIOCGIFADDR, (char *)&ifr) < 0) {
155 (void)close(fd);
162 (void)close(fd);
[all...]
/freebsd-11-stable/share/examples/ses/srcs/
H A Dsesd.c60 int fd, polltime, dev, nodaemon, clear, c; local
100 fd = open(v[dev], O_RDWR);
101 if (fd < 0) {
105 if (ioctl(fd, ENCIOC_INIT, NULL) < 0) {
110 (void) close(fd);
124 fd = open(v[dev], O_RDWR);
125 if (fd < 0) {
133 if (ioctl(fd, ENCIOC_GETENCSTAT, (caddr_t) &stat) < 0) {
136 (void) close(fd);
141 if (ioctl(fd, ENCIOC_SETENCSTA
[all...]

Completed in 186 milliseconds

1234567891011>>