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

1234567891011>>

/freebsd-head/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-head/lib/libulog/
H A Dutempter.c38 utempter_add_record(int fd, const char *host) argument
41 ulog_login_pseudo(fd, host);
42 last_fd = fd;
58 utempter_remove_record(int fd) argument
61 ulog_logout_pseudo(fd);
62 if (last_fd == fd)
68 addToUtmp(const char *pty __unused, const char *host, int fd) argument
71 utempter_add_record(fd, host);
82 removeLineFromUtmp(const char *pty __unused, int fd) argument
85 utempter_remove_record(fd);
[all...]
/freebsd-head/usr.sbin/vidcontrol/
H A Ddecode.h3 int decode(FILE *fd, char *buffer, int len);
/freebsd-head/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-head/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-head/lib/libutil/
H A Dlogin_tty.c44 login_tty(int fd) argument
51 if (tcsetsid(fd, s) == -1)
53 (void) dup2(fd, 0);
54 (void) dup2(fd, 1);
55 (void) dup2(fd, 2);
56 if (fd > 2)
57 (void) close(fd);
/freebsd-head/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
209 fcntl_tests_2(int fd) argument
258 int fd; local
284 int fd; local
413 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
177 ioctl_tests_2(int fd) argument
219 int fd; local
248 int fd; local
319 int fd, pfd, sp[2]; local
[all...]
/freebsd-head/contrib/openbsm/compat/
H A Dclosefrom.h38 int error, fd, maxfd; local
45 for (fd = lowfd; fd <= maxfd; fd++)
46 (void)close(fd);
/freebsd-head/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-head/lib/libgeom/
H A Dgeom_util.c56 int fd; local
58 path = g_device_path_open(name, &fd, dowrite);
61 return (fd);
65 g_close(int fd) argument
68 return (close(fd));
72 g_ioctl_arg(int fd, unsigned long cmd, void *arg) argument
77 ret = ioctl(fd, cmd, arg);
79 ret = ioctl(fd, cmd);
84 g_ioctl(int fd, unsigned long cmd) argument
87 return (g_ioctl_arg(fd, cm
94 g_mediasize(int fd) argument
107 g_sectorsize(int fd) argument
120 g_stripesize(int fd) argument
133 g_stripeoffset(int fd) argument
146 g_providername(int fd) argument
159 g_flush(int fd) argument
169 g_delete(int fd, off_t offset, off_t length) argument
182 g_get_ident(int fd, char *ident, size_t size) argument
205 int fd; local
225 int error, fd; local
279 int fd; local
[all...]
/freebsd-head/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-head/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-head/usr.sbin/pciconf/
H A Dpciconf.h38 void list_caps(int fd, struct pci_conf *p);
39 void list_errors(int fd, struct pci_conf *p);
40 uint8_t pci_find_cap(int fd, struct pci_conf *p, uint8_t id);
41 uint16_t pcie_find_cap(int fd, struct pci_conf *p, uint16_t id);
42 void print_bar(int fd, struct pci_conf *p, const char *label, uint16_t bar);
43 uint32_t read_config(int fd, struct pcisel *sel, long reg, int width);
/freebsd-head/lib/libcasper/libcasper/
H A Dlibcasper_impl.c42 fd_is_valid(int fd) argument
45 return (fcntl(fd, F_GETFL) != -1 || errno != EBADF);
/freebsd-head/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-head/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-head/contrib/diff/lib/
H A Dsetmode.h25 # define set_binary_mode(fd, mode) true
/freebsd-head/crypto/heimdal/lib/roken/
H A Dclosefrom.c46 closefrom(int fd) argument
53 for (; fd <= num; fd++)
54 close(fd);
H A Ddaemon.c53 int fd; local
70 if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
71 dup2(fd, STDIN_FILENO);
72 dup2(fd, STDOUT_FILENO);
73 dup2(fd, STDERR_FILENO);
74 if (fd > 2)
75 close (fd);
/freebsd-head/usr.bin/tftp/
H A Dtftp.h35 void recvfile(int peer, char *port, int fd, char *name, char *mode);
36 void xmitfile(int peer, char *port, int fd, char *name, char *mode);
/freebsd-head/share/syscons/scrnmaps/
H A Dmkscrfil.c39 FILE *fd; local
42 if ((fd = fopen(argv[1], "w")) == NULL) {
46 fwrite(&scrmap, sizeof(scrmap_t), 1, fd);
47 fclose(fd);
/freebsd-head/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...]

Completed in 345 milliseconds

1234567891011>>