Searched refs:fd (Results 126 - 150 of 2333) sorted by relevance

1234567891011>>

/freebsd-11-stable/contrib/llvm-project/compiler-rt/lib/tsan/rtl/
H A Dtsan_fd.cpp44 static bool bogusfd(int fd) { argument
45 // Apparently a bogus fd value.
46 return fd < 0 || fd >= kTableSize;
73 static FdDesc *fddesc(ThreadState *thr, uptr pc, int fd) { argument
74 CHECK_GE(fd, 0);
75 CHECK_LT(fd, kTableSize);
76 atomic_uintptr_t *pl1 = &fdctx.tab[fd / kTableSizeL2];
90 return &fds[fd % kTableSizeL2];
94 static void init(ThreadState *thr, uptr pc, int fd, FdSyn argument
143 FdLocation(uptr addr, int *fd, int *tid, u32 *stack) argument
160 FdAcquire(ThreadState *thr, uptr pc, int fd) argument
171 FdRelease(ThreadState *thr, uptr pc, int fd) argument
182 FdAccess(ThreadState *thr, uptr pc, int fd) argument
190 FdClose(ThreadState *thr, uptr pc, int fd, bool write) argument
218 FdFileCreate(ThreadState *thr, uptr pc, int fd) argument
244 FdEventCreate(ThreadState *thr, uptr pc, int fd) argument
251 FdSignalCreate(ThreadState *thr, uptr pc, int fd) argument
258 FdInotifyCreate(ThreadState *thr, uptr pc, int fd) argument
265 FdPollCreate(ThreadState *thr, uptr pc, int fd) argument
272 FdSocketCreate(ThreadState *thr, uptr pc, int fd) argument
280 FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd) argument
289 FdSocketConnecting(ThreadState *thr, uptr pc, int fd) argument
297 FdSocketConnect(ThreadState *thr, uptr pc, int fd) argument
[all...]
/freebsd-11-stable/tools/regression/poll/
H A Dsockpoll.c77 static int fd[2]; variable
84 if (socketpair(AF_UNIX, SOCK_STREAM, 0, fd) != 0)
86 if (set_nonblocking(fd[0]) == -1)
88 if (set_nonblocking(fd[1]) == -1)
90 pfd0.fd = fd[0];
92 pfd1.fd = fd[1];
113 if (write(fd[0], largeblock, sizeof(largeblock)) == -1)
121 close(fd[
[all...]
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/c063/
H A Dt_openat.c53 atf_tc_set_md_var(tc, "descr", "See that openat works with fd");
58 int fd; local
61 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
62 ATF_REQUIRE(close(fd) == 0);
65 ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDONLY, 0)) != -1);
67 ATF_REQUIRE(close(fd) == 0);
74 "See that openat works with fd as AT_FDCWD");
78 int fd; local
81 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
82 ATF_REQUIRE(close(fd)
97 int fd; local
111 int fd; local
127 int fd; local
146 int fd; local
[all...]
/freebsd-11-stable/contrib/netbsd-tests/lib/librumphijack/
H A Dh_client.c98 int fd, rv; local
100 fd = open("/rump/dev/null", O_RDWR);
101 if (fd == -1)
103 close(fd);
105 pfd[0].fd = STDIN_FILENO;
107 pfd[1].fd = fd;
121 int fd; local
124 if ((fd = open("/dev/null", O_RDWR)) == -1)
126 } while (fd <
[all...]
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/gen/
H A Dt_ttyname.c51 int fd; local
53 fd = open("XXX", O_RDONLY);
55 if (fd < 0) {
59 ATF_REQUIRE(isatty(fd) != -1);
64 ATF_REQUIRE(ttyname(fd) == NULL);
68 fd = open("/etc/passwd", O_RDONLY);
70 if (fd >= 0) {
74 ATF_REQUIRE(isatty(fd) != -1);
79 ATF_REQUIRE(ttyname(fd) == NULL);
81 (void)close(fd);
95 int fd; local
[all...]
/freebsd-11-stable/contrib/ipfilter/ipsend/
H A Dsdlpi.c60 int i, fd; local
78 if ((fd = open(devname, O_RDWR)) < 0)
85 if (dlattachreq(fd, i) == -1)
90 else if (dlokack(fd, buf) == -1)
96 if (dlpromisconreq(fd, DL_PROMISC_SAP) < 0)
101 else if (dlokack(fd, buf) < 0)
108 dlbindreq(fd, 22, 1, DL_HP_RAWDLS, 0, 0);
110 dlbindreq(fd, ETHERTYPE_IP, 0, DL_CLDLS, 0, 0);
112 dlbindack(fd, buf);
117 if (strioctl(fd, DLIOCRA
[all...]
/freebsd-11-stable/contrib/llvm-project/lldb/source/Host/common/
H A DFileCache.cpp38 lldb::user_id_t fd = file.get()->GetDescriptor(); local
39 m_cache[fd] = std::move(file.get());
40 return fd;
43 bool FileCache::CloseFile(lldb::user_id_t fd, Status &error) { argument
44 if (fd == UINT64_MAX) {
48 FDToFileMap::iterator pos = m_cache.find(fd);
50 error.SetErrorStringWithFormat("invalid host file descriptor %" PRIu64, fd);
63 uint64_t FileCache::WriteFile(lldb::user_id_t fd, uint64_t offset, argument
66 if (fd == UINT64_MAX) {
70 FDToFileMap::iterator pos = m_cache.find(fd);
90 ReadFile(lldb::user_id_t fd, uint64_t offset, void *dst, uint64_t dst_len, Status &error) argument
[all...]
/freebsd-11-stable/crypto/heimdal/lib/krb5/
H A Dstore_fd.c38 int fd; member in struct:fd_storage
41 #define FD(S) (((fd_storage*)(S)->data)->fd)
92 int fd; local
97 fd = dup(fd_in);
99 fd = _open_osfhandle(fd_in, 0);
102 #error Dont know how to deal with fd that may or may not be a socket.
105 fd = dup(fd_in);
108 if (fd < 0)
113 close(fd);
119 close(fd);
[all...]
H A Dnet_write.c42 krb5_socket_t fd = *((krb5_socket_t *)p_fd); local
43 return net_write(fd, buf, len);
53 krb5_socket_t fd = *((krb5_socket_t *)p_fd); local
63 FD_SET(fd, &wfds);
72 ret = select(fd + 1, NULL, &wfds, NULL, tvp);
85 count = send (fd, cbuf, rem, 0);
96 if (!FD_ISSET(fd, &wfds)) {
101 count = write (fd, cbuf, rem);
/freebsd-11-stable/stand/libsa/
H A Dopen.c75 int fd; local
77 for (fd = 0; fd < SOPEN_MAX; fd++)
78 if (files[fd].f_flags == 0)
79 return (fd);
96 int fd, i, error, besterror; local
99 if ((fd = o_gethandle()) == -1) {
104 f = &files[fd];
129 return (fd);
[all...]
/freebsd-11-stable/sys/kern/
H A Dsys_capability.c211 cap_rights(struct filedesc *fdp, int fd) argument
214 return (cap_rights_fde(&fdp->fd_ofiles[fd]));
218 kern_cap_rights_limit(struct thread *td, int fd, cap_rights_t *rights) argument
225 if (fget_locked(fdp, fd) == NULL) {
229 error = _cap_check(cap_rights(fdp, fd), rights, CAPFAIL_INCREASE);
231 fdp->fd_ofiles[fd].fde_rights = *rights;
233 free(fdp->fd_ofiles[fd].fde_ioctls, M_FILECAPS);
234 fdp->fd_ofiles[fd].fde_ioctls = NULL;
235 fdp->fd_ofiles[fd].fde_nioctls = 0;
238 fdp->fd_ofiles[fd]
295 int error, fd, i, n; local
338 cap_ioctl_check(struct filedesc *fdp, int fd, u_long cmd) argument
365 cap_ioctl_limit_check(struct filedesc *fdp, int fd, const u_long *cmds, size_t ncmds) argument
393 kern_cap_ioctls_limit(struct thread *td, int fd, u_long *cmds, size_t ncmds) argument
458 int error, fd; local
517 cap_fcntl_check(struct filedesc *fdp, int fd, int cmd) argument
531 int fd; local
566 int fd; local
[all...]
/freebsd-11-stable/sys/geom/
H A Dgeom_redboot.c79 g_redboot_print(int i, struct fis_image_desc *fd) argument
82 printf("[%2d] \"%-15.15s\" %08x:%08x", i, fd->name,
83 fd->offset, fd->size);
84 printf(" addr %08x entry %08x\n", fd->addr, fd->entry);
85 printf(" dsize 0x%x dsum 0x%x fsum 0x%x\n", fd->dsize,
86 fd->dsum, fd->fsum);
174 struct fis_image_desc *fd, *ef local
244 struct fis_image_desc *fd, *head; local
[all...]
/freebsd-11-stable/share/examples/ses/srcs/
H A Dgetencstat.c56 int fd, nobj, f, i, verbose, quiet, errors; local
78 fd = open(*v, O_RDONLY);
79 if (fd < 0) {
86 if (ioctl(fd, ENCIOC_GETENCNAME, (caddr_t) &stri) == 0)
90 if (ioctl(fd, ENCIOC_GETENCID, (caddr_t) &stri) == 0)
93 if (ioctl(fd, ENCIOC_GETNELM, (caddr_t) &nobj) < 0) {
95 (void) close(fd);
98 if (ioctl(fd, ENCIOC_GETENCSTAT, (caddr_t) &estat) < 0) {
100 (void) close(fd);
106 (void) close(fd);
[all...]
/freebsd-11-stable/usr.sbin/mfiutil/
H A Dmfi_volume.c78 mfi_ld_get_list(int fd, struct mfi_ld_list *list, uint8_t *statusp) argument
81 return (mfi_dcmd_command(fd, MFI_DCMD_LD_GET_LIST, list,
86 mfi_ld_get_info(int fd, uint8_t target_id, struct mfi_ld_info *info, argument
92 return (mfi_dcmd_command(fd, MFI_DCMD_LD_GET_INFO, info,
97 mfi_ld_get_props(int fd, uint8_t target_id, struct mfi_ld_props *props) argument
102 return (mfi_dcmd_command(fd, MFI_DCMD_LD_GET_PROP, props,
107 mfi_ld_set_props(int fd, struct mfi_ld_props *props) argument
112 return (mfi_dcmd_command(fd, MFI_DCMD_LD_SET_PROP, props,
117 update_cache_policy(int fd, struct mfi_ld_props *old, struct mfi_ld_props *new) argument
162 if (mfi_ld_set_props(fd, ne
292 int error, fd, consumed; local
396 int error, fd; local
451 int error, fd; local
[all...]
/freebsd-11-stable/usr.sbin/makefs/cd9660/
H A Dcd9660_write.c65 FILE *fd; local
69 if ((fd = fopen(image, "w+")) == NULL) {
78 status = cd9660_copy_file(diskStructure, fd, 0,
88 status = cd9660_write_volume_descriptors(diskStructure, fd);
102 status = cd9660_write_path_tables(diskStructure, fd);
112 status = cd9660_write_file(diskStructure, fd, diskStructure->rootNode);
119 cd9660_write_boot(diskStructure, fd);
124 cd9660_write_filedata(diskStructure, fd,
129 fclose(fd);
136 fclose(fd);
145 cd9660_write_volume_descriptors(iso9660_disk *diskStructure, FILE *fd) argument
168 cd9660_write_path_table(iso9660_disk *diskStructure, FILE *fd, off_t sector, int mode) argument
239 cd9660_write_path_tables(iso9660_disk *diskStructure, FILE *fd) argument
265 cd9660_write_file(iso9660_disk *diskStructure, FILE *fd, cd9660node *writenode) argument
396 cd9660_write_filedata(iso9660_disk *diskStructure, FILE *fd, off_t sector, const unsigned char *buf, int numsecs) argument
430 cd9660_copy_file(iso9660_disk *diskStructure, FILE *fd, off_t start_sector, const char *filename) argument
477 cd9660_write_rr(iso9660_disk *diskStructure, FILE *fd, cd9660node *writenode, off_t offset, off_t sector) argument
[all...]
/freebsd-11-stable/contrib/libreadline/examples/
H A Drl.c3 * (or another fd) using readline.
87 int opt, fd, nch; local
98 fd = nch = 0;
109 fd = atoi(optarg);
110 if (fd < 0)
133 if (fd != 0)
135 if (fstat (fd, &sb) < 0)
137 fprintf (stderr, "%s: %d: bad file descriptor\n", progname, fd);
140 ifp = fdopen (fd, "r");
/freebsd-11-stable/contrib/dialog/samples/
H A Dinputbox53 # use --output-fd to write to a different output than stderr
9 $DIALOG --title "INPUT BOX" --clear --output-fd 4 "$@" \
/freebsd-11-stable/contrib/ipfilter/lib/
H A Dipf_dotuning.c15 void ipf_dotuning(fd, tuneargs, iocfn)
16 int fd;
33 if ((*iocfn)(fd, SIOCIPFGETNEXT, &obj) == -1) {
34 ipf_perror_fd(fd, iocfn,
49 if ((*iocfn)(fd, SIOCIPFSET, &obj) == -1) {
50 ipf_perror_fd(fd, iocfn,
61 if ((*iocfn)(fd, SIOCIPFGET, &obj) == -1) {
62 ipf_perror_fd(fd, iocfn, "ioctl(SIOCIPFGET)");
/freebsd-11-stable/contrib/tcp_wrappers/
H A Dncr.c34 int fd = request->fd; local
50 if ((num_mod = ioctl(fd, I_LIST, NULL)) < 0)
52 if (ioctl(fd, I_LIST, &str_list) < 0)
59 if (ioctl(fd, I_POP, 0) < 0)
65 if (ioctl(fd, I_PUSH, "timod") < 0)
72 if (ioctl(fd, I_POP, 0) < 0)
79 if (ioctl(fd, I_PUSH, mod_buffer[i].l_name) < 0)
/freebsd-11-stable/lib/libc/stdio/
H A Ddprintf.c37 dprintf(int fd, const char * __restrict fmt, ...) argument
43 ret = vdprintf(fd, fmt, ap);
/freebsd-11-stable/lib/libc/sys/
H A Dclose.c45 close(int fd) argument
48 return (((int (*)(int))__libc_interposing[INTERPOS_close])(fd));
H A Dread.c45 read(int fd, void *buf, size_t nbytes) argument
49 __libc_interposing[INTERPOS_read])(fd, buf, nbytes));
H A Dwrite.c45 write(int fd, const void *buf, size_t nbytes) argument
49 __libc_interposing[INTERPOS_write])(fd, buf, nbytes));
/freebsd-11-stable/release/picobsd/mfs_tree/etc/
H A Drc15 echo "Loading /etc from MFS:/fd ..."
16 cp -Rp /fd/* /
18 mount -o rdonly ${dev} /fd && \
19 { cd /fd; cp -Rp etc root / ; cd / ; umount /fd ; }
/freebsd-11-stable/lib/libc/gen/
H A Disatty.c40 isatty(int fd) argument
45 retval = (tcgetattr(fd, &t) != -1);

Completed in 273 milliseconds

1234567891011>>