Searched refs:fd (Results 1 - 25 of 2333) sorted by relevance

1234567891011>>

/freebsd-11-stable/tools/regression/sockets/unix_cmsg/
H A Dt_cmsgcred.h29 int t_cmsgcred_client(int fd);
H A Dt_generic.c42 int fd, rv, rv_client; local
46 fd = uc_socket_create();
47 if (fd < 0)
50 rv = client_func(fd);
51 if (uc_socket_close(fd) < 0)
57 fd = uc_socket_create();
58 if (fd < 0)
61 rv = server_func(fd);
65 if (uc_socket_close(fd) < 0)
/freebsd-11-stable/lib/libulog/
H A Dutempter.c36 utempter_add_record(int fd, const char *host) argument
39 ulog_login_pseudo(fd, host);
40 last_fd = fd;
56 utempter_remove_record(int fd) argument
59 ulog_logout_pseudo(fd);
60 if (last_fd == fd)
66 addToUtmp(const char *pty __unused, const char *host, int fd) argument
69 utempter_add_record(fd, host);
80 removeLineFromUtmp(const char *pty __unused, int fd) argument
83 utempter_remove_record(fd);
[all...]
/freebsd-11-stable/lib/libnv/
H A Dcommon_impl.h35 #define fd_is_valid(fd) (fcntl((fd), F_GETFL) != -1 || errno != EBADF)
/freebsd-11-stable/usr.sbin/vidcontrol/
H A Ddecode.h3 int decode(FILE *fd, char *buffer, int len);
/freebsd-11-stable/contrib/sendmail/include/sm/
H A Dfdset.h16 ** Note: SM_FD_OK_SELECT(fd) requires that ValidSocket(fd) has been checked
20 #define SM_FD_SET(fd, pfdset) FD_SET(fd, pfdset)
21 #define SM_FD_ISSET(fd, pfdset) FD_ISSET(fd, pfdset)
23 #define SM_FD_OK_SELECT(fd) (SM_FD_SETSIZE <= 0 || (fd) < SM_FD_SETSIZE)
/freebsd-11-stable/lib/libutil/
H A Dlogin_tty.c47 login_tty(int fd) argument
54 if (tcsetsid(fd, s) == -1)
56 (void) dup2(fd, 0);
57 (void) dup2(fd, 1);
58 (void) dup2(fd, 2);
59 if (fd > 2)
60 (void) close(fd);
/freebsd-11-stable/crypto/openssh/openbsd-compat/
H A Ddaemon.c54 int fd; local
71 if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
72 (void)dup2(fd, STDIN_FILENO);
73 (void)dup2(fd, STDOUT_FILENO);
74 (void)dup2(fd, STDERR_FILENO);
75 if (fd > 2)
76 (void)close (fd);
/freebsd-11-stable/tools/regression/capsicum/syscalls/
H A Dcap_fcntls_limit.c48 fcntl_tests_0(int fd) argument
53 CHECK(cap_fcntls_get(fd, &fcntlrights) == 0);
56 CHECK(fcntl(fd, F_GETFD) == 0);
57 CHECK(fcntl(fd, F_SETFD, FD_CLOEXEC) == 0);
58 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC);
59 CHECK(fcntl(fd, F_SETFD, 0) == 0);
60 CHECK(fcntl(fd, F_GETFD) == 0);
62 CHECK(fcntl(fd, F_GETFL) == O_RDWR);
63 CHECK(fcntl(fd, F_SETFL, O_NONBLOCK) == 0);
64 CHECK(fcntl(fd, F_GETF
157 fcntl_tests_1(int fd) argument
206 fcntl_tests_2(int fd) argument
252 int fd; local
278 int fd; local
407 int fd, pfd, sp[2]; local
[all...]
H A Dcap_ioctls_limit.c50 ioctl_tests_0(int fd) argument
54 CHECK(cap_ioctls_get(fd, NULL, 0) == CAP_IOCTLS_ALL);
56 CHECK(fcntl(fd, F_GETFD) == 0);
57 CHECK(ioctl(fd, FIOCLEX) == 0);
58 CHECK(fcntl(fd, F_GETFD) == FD_CLOEXEC);
59 CHECK(ioctl(fd, FIONCLEX) == 0);
60 CHECK(fcntl(fd, F_GETFD) == 0);
64 CHECK(cap_ioctls_limit(fd, cmds, nitems(cmds)) == 0);
66 CHECK(cap_ioctls_get(fd, cmds, nitems(cmds)) == nitems(cmds));
71 CHECK(cap_ioctls_limit(fd, cmd
131 ioctl_tests_1(int fd) argument
173 ioctl_tests_2(int fd) argument
211 int fd; local
240 int fd; local
311 int fd, pfd, sp[2]; local
[all...]
/freebsd-11-stable/contrib/openbsm/compat/
H A Dclosefrom.h38 int error, fd, maxfd; local
45 for (fd = lowfd; fd <= maxfd; fd++)
46 (void)close(fd);
/freebsd-11-stable/stand/libsa/
H A Dstat.c44 int fd, rv; local
46 fd = open(str, O_RDONLY);
47 if (fd < 0)
49 rv = fstat(fd, sb);
50 (void)close(fd);
H A Dfstat.c40 fstat(fd, sb)
41 int fd;
44 struct open_file *f = &files[fd];
46 if ((unsigned)fd >= SOPEN_MAX || f->f_flags == 0) {
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs/common/
H A Dlibzfs_compat.h36 int zcmd_ioctl(int fd, int request, zfs_cmd_t *zc);
38 #define ioctl(fd, ioc, zc) zcmd_ioctl((fd), (ioc), (zc))
/freebsd-11-stable/contrib/ntp/libntp/
H A Dsocket.c21 #define ioctl(fd, opt, val) ioctlsocket(fd, opt, (u_long *)(val))
36 * - keep a current socket fd boundary initialized with
43 * if failure and boundary == 0 return old fd
44 * - on success close old fd return new fd
47 * - fds will be moved above the socket fd boundary
55 SOCKET fd
81 REQUIRE((int)fd >= 0);
100 if (fd >
[all...]
/freebsd-11-stable/usr.sbin/pciconf/
H A Dpciconf.h36 void list_caps(int fd, struct pci_conf *p);
37 void list_errors(int fd, struct pci_conf *p);
38 uint8_t pci_find_cap(int fd, struct pci_conf *p, uint8_t id);
39 uint16_t pcie_find_cap(int fd, struct pci_conf *p, uint16_t id);
40 void print_bar(int fd, struct pci_conf *p, const char *label, uint16_t bar);
41 uint32_t read_config(int fd, struct pcisel *sel, long reg, int width);
/freebsd-11-stable/tools/regression/nfsmmap/test1/
H A Dtest1.c8 int fd, fd2; local
17 fd = open("test1.data", O_RDWR|O_CREAT, 0666);
18 if (fd < 0)
20 if (write(fd, zeros, sizeof zeros) < 0)
22 close(fd);
25 fd = open("test1.data", O_RDWR);
26 if (fd < 0)
28 if (lseek(fd, 600, SEEK_SET) < 0)
31 if (write(fd, ones, sizeof ones) < 0)
34 fsync(fd);
[all...]
/freebsd-11-stable/tools/regression/poll/
H A Dpipeselect.c20 #define SETUP(fd, rfds, tv) do { \
22 FD_SET((fd), &(rfds)); \
60 child(int fd, int num) argument
68 fd = open(FIFONAME, O_RDONLY | O_NONBLOCK);
69 if (fd < 0)
72 if (fd >= FD_SETSIZE)
73 errx(1, "fd = %d too large for select()", fd);
76 SETUP(fd, rfds, tv);
77 if (select(fd
218 parent(int fd) argument
276 int fd[2], num; local
[all...]
/freebsd-11-stable/contrib/dialog/
H A Dprgbox.c39 int fd[2]; local
43 if ((*type == 'r' || *type != 'w') && pipe(fd) == 0) {
46 (void) close(fd[0]);
47 (void) close(fd[1]);
51 if (fd[1] != STDOUT_FILENO) {
52 (void) dup2(fd[1], STDOUT_FILENO);
53 (void) close(fd[1]);
56 (void) close(fd[0]);
58 if (fd[0] != STDIN_FILENO) {
59 (void) dup2(fd[
[all...]
/freebsd-11-stable/contrib/diff/lib/
H A Dsetmode.h25 # define set_binary_mode(fd, mode) true
/freebsd-11-stable/share/syscons/scrnmaps/
H A Dmkscrfil.c37 FILE *fd; local
40 if ((fd = fopen(argv[1], "w")) == NULL) {
44 fwrite(&scrmap, sizeof(scrmap_t), 1, fd);
45 fclose(fd);
/freebsd-11-stable/crypto/heimdal/lib/roken/
H A Dclosefrom.c46 closefrom(int fd) argument
53 for (; fd <= num; fd++)
54 close(fd);
/freebsd-11-stable/usr.bin/tftp/
H A Dtftp.h33 void recvfile(int peer, char *port, int fd, char *name, char *mode);
34 void xmitfile(int peer, char *port, int fd, char *name, char *mode);
/freebsd-11-stable/contrib/ipfilter/lib/
H A Dkvatoname.c22 int fd; local
26 fd = -1;
29 fd = open(IPL_NAME, O_RDONLY);
30 if (fd == -1)
33 (void) (*iocfunc)(fd, SIOCFUNCL, &res);
34 if (fd >= 0)
35 close(fd);
H A Dnametokva.c21 int fd; local
25 fd = -1;
28 fd = open(IPL_NAME, O_RDONLY);
29 if (fd == -1)
32 (void) (*iocfunc)(fd, SIOCFUNCL, &res);
33 if (fd >= 0)
34 close(fd);

Completed in 170 milliseconds

1234567891011>>