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

1234567891011>>

/freebsd-11-stable/crypto/openssh/openbsd-compat/
H A Dbsd-nextstep.c47 tcgetattr(int fd, struct termios *t) argument
49 return (ioctl(fd, TIOCGETA, t));
53 tcsetattr(int fd, int opt, const struct termios *t) argument
64 return (ioctl(fd, TIOCSETA, t));
66 return (ioctl(fd, TIOCSETAW, t));
68 return (ioctl(fd, TIOCSETAF, t));
75 int tcsetpgrp(int fd, pid_t pgrp) argument
77 return (ioctl(fd, TIOCSPGRP, &pgrp));
/freebsd-11-stable/libexec/ftpd/
H A Dblacklist.c51 blacklist_notify(int action, int fd, const char *msg) argument
56 (void)blacklist_r(blstate, action, fd, msg);
/freebsd-11-stable/contrib/netbsd-tests/fs/union/
H A Dt_pr.c66 int fd, res; local
80 fd = rump_sys_open("/mp/null", O_WRONLY | O_CREAT | O_TRUNC);
82 if (fd == -1)
85 res = rump_sys_write(fd, &fd, sizeof(fd));
86 if (res != sizeof(fd))
100 int fd, res; local
114 fd = rump_sys_open("/mp/null", O_WRONLY | O_CREAT | O_APPEND);
115 if (fd
[all...]
/freebsd-11-stable/contrib/ipfilter/ipsend/
H A Dsbpf.c64 int fd; local
66 if ((fd = open(bpfname, O_RDWR)) < 0)
73 int fd = 0, i; local
78 if ((fd = open(bpfname, O_RDWR)) >= 0)
88 if (ioctl(fd, BIOCVERSION, (caddr_t)&bv) < 0)
104 if (ioctl(fd, BIOCSETIF, &ifr) == -1)
106 fprintf(stderr, "%s(%d):", ifr.ifr_name, fd);
113 if (ioctl(fd, BIOCGBLEN, &bufsize) == -1)
125 if (ioctl(fd, BIOCSRTIMEOUT, (caddr_t)&to) == -1)
131 (void) ioctl(fd, BIOCFLUS
[all...]
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/stdlib/
H A Dt_system.c51 int fd, i = 2; local
60 fd = open(path, O_RDONLY);
61 ATF_REQUIRE(fd >= 0);
65 ATF_REQUIRE(read(fd, buf, 21) == 21);
68 ATF_REQUIRE(close(fd) == 0);
/freebsd-11-stable/lib/libc/posix1e/
H A Dmac_get.c39 extern int __mac_get_fd(int fd, struct mac *mac_p);
46 mac_get_fd(int fd, struct mac *label) argument
49 return (__mac_get_fd(fd, label));
67 mac_get_peer(int fd, struct mac *label) argument
72 return (getsockopt(fd, SOL_SOCKET, SO_PEERLABEL, label, &len));
/freebsd-11-stable/tools/regression/priv/
H A Dpriv_netinet_raw.c57 int error, fd; local
59 fd = socket(PF_INET, SOCK_RAW, 0);
60 if (fd < 0)
74 if (fd >= 0)
75 (void)close(fd);
/freebsd-11-stable/tools/tools/mfi/
H A Dmfi_checkq.c56 int fd, retval, queue; local
61 fd = open("/dev/mfi0", O_RDWR);
62 if (fd == -1) {
71 retval = ioctl(fd, MFIIO_STATS, &sr);
79 close(fd);
/freebsd-11-stable/share/examples/ses/srcs/
H A Dgetobjstat.c47 int fd; local
58 fd = open(v[1], O_RDONLY);
59 if (fd < 0) {
69 if (ioctl(fd, SESIOC_GETOBJSTAT, (caddr_t) &obj) < 0) {
75 (void) close(fd);
H A Dchpmon.c52 int fd, delay, dev; local
70 fd = open(v[dev], O_RDWR);
71 if (fd < 0) {
80 if (ioctl(fd, SESIOC_SETENCSTAT, (caddr_t) &stat) < 0) {
83 (void) close(fd);
89 if (ioctl(fd, SESIOC_GETENCSTAT, (caddr_t) &stat) < 0) {
92 (void) close(fd);
102 (void) close(fd);
117 if (ioctl(fd, SESIOC_SETENCSTAT, (caddr_t) &stat) < 0) {
121 (void) close(fd);
[all...]
/freebsd-11-stable/tools/tools/aac/
H A Daac_checkq.c59 int fd, retval, queue; local
64 fd = open("/dev/aac0", O_RDWR);
65 if (fd == -1) {
74 retval = ioctl(fd, AACIO_STATS, &sr);
82 close(fd);
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/sys/
H A Dt_pipe2.c51 int fd[2], i; local
63 ATF_REQUIRE(pipe2(fd, flags) == 0);
65 ATF_REQUIRE(fd[0] == 3);
66 ATF_REQUIRE(fd[1] == 4);
69 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) != 0);
70 ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) != 0);
72 ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) == 0);
73 ATF_REQUIRE((fcntl(fd[1], F_GETFD) & FD_CLOEXEC) == 0);
77 ATF_REQUIRE((fcntl(fd[0], F_GETFL) & O_NONBLOCK) != 0);
78 ATF_REQUIRE((fcntl(fd[
190 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
[all...]
/freebsd-11-stable/usr.sbin/diskinfo/
H A Ddiskinfo.c69 static bool candelete(int fd);
70 static void speeddisk(int fd, off_t mediasize, u_int sectorsize);
71 static void commandtime(int fd, off_t mediasize, u_int sectorsize);
72 static void iopsbench(int fd, off_t mediasize, u_int sectorsize);
73 static void rotationrate(int fd, char *buf, size_t buflen);
74 static void slogbench(int fd, int isreg, off_t mediasize, u_int sectorsize);
75 static int zonecheck(int fd, uint32_t *zone_mode, char *zone_str,
84 int i, ch, fd, error, exitval = 0; local
146 fd = open(argv[i], (opt_w ? O_RDWR : O_RDONLY) | O_DIRECT);
147 if (fd <
280 candelete(int fd) argument
293 rotationrate(int fd, char *rate, size_t buflen) argument
313 rdsect(int fd, off_t blockno, u_int sectorsize) argument
327 rdmega(int fd) argument
405 speeddisk(int fd, off_t mediasize, u_int sectorsize) argument
525 commandtime(int fd, off_t mediasize, u_int sectorsize) argument
557 iops(int fd, off_t mediasize, u_int sectorsize) argument
620 iopsbench(int fd, off_t mediasize, u_int sectorsize) argument
645 parwrite(int fd, size_t size, off_t off) argument
676 slogbench(int fd, int isreg, off_t mediasize, u_int sectorsize) argument
711 zonecheck(int fd, uint32_t *zone_mode, char *zone_str, size_t zone_str_len) argument
[all...]
/freebsd-11-stable/contrib/gcclibs/libssp/
H A Dssp.c67 int fd; local
72 fd = open ("/dev/urandom", O_RDONLY);
73 if (fd != -1)
75 ssize_t size = read (fd, &__stack_chk_guard,
77 close (fd);
98 int fd; local
102 fd = open (_PATH_TTY, O_WRONLY);
103 if (fd != -1)
121 ssize_t wrote = write (fd, buf, len);
127 close (fd);
[all...]
/freebsd-11-stable/crypto/openssl/engines/vendor_defns/
H A Dhw_ubsec.h57 typedef int t_UBSEC_ubsec_close(int fd);
59 typedef int t_UBSEC_diffie_hellman_generate_ioctl(int fd,
70 typedef int t_UBSEC_diffie_hellman_agree_ioctl(int fd,
76 typedef int t_UBSEC_rsa_mod_exp_ioctl(int fd,
82 typedef int t_UBSEC_rsa_mod_exp_crt_ioctl(int fd,
91 typedef int t_UBSEC_dsa_sign_ioctl(int fd,
101 typedef int t_UBSEC_dsa_verify_ioctl(int fd,
111 typedef int t_UBSEC_math_accelerate_ioctl(int fd, ubsec_MathCommand_t command,
121 typedef int t_UBSEC_rng_ioctl(int fd, ubsec_RNGCommand_t command,
124 typedef int t_UBSEC_max_key_len_ioctl(int fd, in
[all...]
/freebsd-11-stable/contrib/netbsd-tests/net/if/
H A Difconf.c53 int fd, r; local
56 fd = socket(AF_INET, SOCK_DGRAM, 0);
57 if (fd == -1)
63 r = ioctl(fd, SIOCGIFCONF, &ifc);
67 close(fd);
81 int i, fd, r; local
95 fd = socket(AF_INET, SOCK_DGRAM, 0);
96 if (fd == -1)
102 r = ioctl(fd, SIOCGIFCONF, &ifc);
105 close(fd);
[all...]
/freebsd-11-stable/contrib/netbsd-tests/dev/dm/
H A Dh_dm.c58 int fd; local
70 fd = rump_sys_open("/dev/mapper/control", O_RDWR, 0);
71 if (fd == -1)
79 error = rump_sys_ioctl(fd, NETBSD_DM_IOCTL, &prefp);
88 rump_sys_close(fd);
98 int fd; local
110 fd = rump_sys_open("/dev/mapper/control", O_RDWR, 0);
111 if (fd == -1)
119 error = rump_sys_ioctl(fd, NETBSD_DM_IOCTL, &prefp);
128 rump_sys_close(fd);
[all...]
/freebsd-11-stable/contrib/netbsd-tests/fs/puffs/
H A Dt_basic.c90 int fd, rv; local
94 fd = rump_sys_open(FSTEST_MNTNAME, O_RDWR);
95 if (fd == -1)
97 if (rump_sys_write(fd, &fd, sizeof(fd)) != sizeof(fd))
102 rump_sys_close(fd);
147 int fd = (int)(uintptr_t)arg; local
152 if (rump_sys_write(fd, bu
164 int fd; local
197 int fd; local
231 int fd; local
268 int fd; local
308 int fd; local
359 int fd, ianow; local
[all...]
/freebsd-11-stable/usr.bin/resizewin/
H A Dresizewin.c66 int ch, cnt, error, fd, ret, zflag; local
84 if ((fd = open("/dev/tty", O_RDWR | O_NONBLOCK)) == -1)
88 if (ioctl(fd, TIOCGWINSZ, &w) == -1)
95 if (tcgetattr(fd, &old) == -1)
101 if (tcsetattr(fd, TCSAFLUSH, &new) == -1)
104 if (write(fd, query, sizeof(query)) != sizeof(query)) {
114 ret = read(fd, data + cnt, 1);
151 if (ioctl(fd, TIOCSWINSZ, &w) == -1)
155 tcsetattr(fd, TCSANOW, &old);
157 close(fd);
[all...]
/freebsd-11-stable/stand/i386/loader/
H A Dchain.c58 int fd, len, size = SECTOR_SIZE; local
72 fd = open(argv[1], O_RDONLY);
73 if (fd == -1) {
80 if (fstat(fd, &st) == -1) {
82 close(fd);
88 close(fd);
95 close(fd);
99 if (archsw.arch_readin(fd, mem, size) != size) {
101 close(fd);
104 close(fd);
[all...]
/freebsd-11-stable/tools/regression/security/open_to_operation/
H A Dopen_to_operation.c206 int dfd, fd, i, mode; local
213 fd = open(path, mode);
214 if (fd < 0) {
218 dfd = dup(fd);
224 close(fd);
232 int dfd, fd, i, mode; local
239 fd = open(path, mode);
240 if (fd < 0) {
244 dfd = dup2(fd, 500); /* Arbitrary but high number. */
250 close(fd);
258 int fd, i, mode; local
282 int fd, i, mode; local
306 int fd, i, mode; local
330 int fd, i, mode; local
354 int fd, i, mode; local
378 int fd, i, mode; local
405 int fd, i, mode; local
430 int fd, i, mode; local
454 int fd, i, mode; local
479 int fd, i, mode; local
591 int fd, i, mode; local
615 int fd, i, mode; local
639 int fd, i, mode; local
679 int fd, i, mode, sv[2]; local
775 int fd, i, mode; local
861 int fd, i, mode; local
896 int fd, i, mode; local
942 int fd, i, mode; local
984 int fd, i, mode; local
1026 int fd, i, mode; local
1072 int dummy, fd; local
[all...]
/freebsd-11-stable/usr.sbin/ofwdump/
H A Dofw_util.c46 #define OFW_IOCTL(fd, cmd, val) do { \
47 if (ioctl(fd, cmd, val) == -1) \
54 int fd; local
56 if ((fd = open(PATH_DEV_OPENFIRM, mode)) == -1)
58 return (fd);
62 ofw_close(int fd) argument
65 close(fd);
69 ofw_root(int fd) argument
72 return (ofw_peer(fd, 0));
76 ofw_optnode(int fd) argument
85 ofw_peer(int fd, phandle_t node) argument
95 ofw_child(int fd, phandle_t node) argument
105 ofw_finddevice(int fd, const char *name) argument
125 ofw_firstprop(int fd, phandle_t node, char *buf, int buflen) argument
132 ofw_nextprop(int fd, phandle_t node, const char *prev, char *buf, int buflen) argument
161 ofw_getprop(int fd, phandle_t node, const char *name, void *buf, int buflen) argument
175 ofw_setprop(int fd, phandle_t node, const char *name, const void *buf, int buflen) argument
192 ofw_getproplen(int fd, phandle_t node, const char *name) argument
204 ofw_getprop_alloc(int fd, phandle_t node, const char *name, void **buf, int *buflen, int reserve) argument
[all...]
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/c063/
H A Dt_o_search.c79 int fd; local
82 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
83 ATF_REQUIRE(close(fd) == 0);
87 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) != -1);
88 ATF_REQUIRE(close(fd) == 0);
92 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) == -1);
109 int fd; local
112 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
113 ATF_REQUIRE(close(fd) == 0);
117 ATF_REQUIRE((fd
141 int fd; local
175 int fd; local
203 int fd; local
233 int fd; local
265 int fd; local
283 int dfd, fd; local
323 int dfd, fd; local
[all...]
/freebsd-11-stable/tests/sys/audit/
H A Dutils.c143 check_auditpipe(struct pollfd fd[], const char *auditregex, FILE *pipestream) argument
157 switch (ppoll(fd, 1, &timeout, NULL)) {
160 if (fd[0].revents & POLLIN) {
165 "unknown event %#x", fd[0].revents);
190 check_audit_startup(struct pollfd fd[], const char *auditrgx, FILE *pipestream){ argument
191 check_auditpipe(fd, auditrgx, pipestream);
195 check_audit(struct pollfd fd[], const char *auditrgx, FILE *pipestream) { argument
196 check_auditpipe(fd, auditrgx, pipestream);
203 *setup(struct pollfd fd[], const char *name) argument
210 ATF_REQUIRE((fd[
[all...]

Completed in 259 milliseconds

1234567891011>>