/freebsd-11-stable/tools/test/upsdl/ |
H A D | upsdl.c | 40 int startIO(int fd,char *buffer); 50 int fd; local 55 fd = open(filename,O_CREAT | O_TRUNC | O_RDWR,S_IRWXU); 56 if (fd == -1) 59 return fd; 62 len = write(fd,wbuffer,FILESIZE); 69 status = fsync(fd); 76 addr = mmap(NULL,FILESIZE, PROT_READ | PROT_WRITE , MAP_SHARED, fd, 0); 92 *fdp = fd; 124 int startIO(int fd,cha argument [all...] |
/freebsd-11-stable/lib/libmd/ |
H A D | mdXhl.c | 45 MDXFd(int fd, char *buf) argument 47 return MDXFdChunk(fd, buf, 0, 0); 51 MDXFdChunk(int fd, char *buf, off_t ofs, off_t len) argument 67 if (lseek(fd, ofs, SEEK_SET) != ofs || 77 readrv = read(fd, buffer, sizeof(buffer)); 79 readrv = read(fd, buffer, remain); 101 int e, fd; local 103 fd = open(filename, O_RDONLY); 104 if (fd < 0) 106 ret = MDXFdChunk(fd, bu [all...] |
/freebsd-11-stable/contrib/libarchive/libarchive/ |
H A D | archive_read_disk_entry_from_file.c | 105 struct archive_entry *, int *fd); 111 struct archive_entry *, int *fd); 113 struct archive_entry *, int *fd); 116 struct archive_entry *, int *fd); 122 struct archive_entry *entry, int *fd) 126 (void)fd; /* UNUSED */ 138 struct archive_entry *entry, int *fd) 150 } else if (fd != NULL && *fd < 0 && a->tree != NULL && 152 *fd 121 archive_read_disk_entry_setup_acls(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument 137 archive_read_disk_entry_setup_path(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument 159 archive_read_disk_entry_from_file(struct archive *_a, struct archive_entry *entry, int fd, const struct stat *st) argument 331 setup_mac_metadata(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument 423 setup_mac_metadata(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument 448 setup_xattr(struct archive_read_disk *a, struct archive_entry *entry, const char *name, int fd, const char *accpath) argument 532 setup_xattrs(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument 662 setup_xattr(struct archive_read_disk *a, struct archive_entry *entry, int namespace, const char *name, const char *fullname, int fd, const char *accpath) argument 708 setup_xattrs_namespace(struct archive_read_disk *a, struct archive_entry *entry, int *fd, int namespace) argument 791 setup_xattrs(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument 821 setup_xattrs(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument 850 setup_sparse_fiemap(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument 943 setup_sparse(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument 958 setup_sparse(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument 1072 setup_sparse(struct archive_read_disk *a, struct archive_entry *entry, int *fd) argument [all...] |
/freebsd-11-stable/contrib/elftoolchain/libelf/ |
H A D | elf_open.c | 38 elf_open(int fd) argument 45 return (_libelf_open_object(fd, ELF_C_READ, 0));
|
/freebsd-11-stable/contrib/pam_modules/pam_passwdqc/ |
H A D | passwdqc_random.c | 15 static int read_loop(int fd, char *buffer, int count) argument 21 block = read(fd, &buffer[offset], count); 43 int fd; local 56 if ((fd = open("/dev/urandom", O_RDONLY)) < 0) return NULL; 60 if (read_loop(fd, bytes, sizeof(bytes)) != sizeof(bytes)) { 61 close(fd); 70 close(fd); 89 close(fd);
|
/freebsd-11-stable/lib/libc/sys/ |
H A D | fcntl.c | 45 fcntl(int fd, int cmd, ...) argument 55 __libc_interposing[INTERPOS_fcntl])(fd, cmd, arg));
|
H A D | readv.c | 46 readv(int fd, const struct iovec *iov, int iovcnt) argument 50 __libc_interposing[INTERPOS_readv])(fd, iov, iovcnt));
|
H A D | writev.c | 46 writev(int fd, const struct iovec *iov, int iovcnt) argument 50 __libc_interposing[INTERPOS_writev])(fd, iov, iovcnt));
|
/freebsd-11-stable/crypto/openssh/ |
H A D | atomicio.h | 36 atomicio6(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n, 46 atomiciov6(ssize_t (*f) (int, const struct iovec *, int), int fd,
|
H A D | msg.c | 45 ssh_msg_send(int fd, u_char type, struct sshbuf *m) argument 54 if (atomicio(vwrite, fd, buf, sizeof(buf)) != sizeof(buf)) { 58 if (atomicio(vwrite, fd, (u_char *)sshbuf_ptr(m), mlen) != mlen) { 66 ssh_msg_recv(int fd, struct sshbuf *m) argument 74 if (atomicio(read, fd, buf, sizeof(buf)) != sizeof(buf)) { 89 if (atomicio(read, fd, p, msg_len) != msg_len) {
|
/freebsd-11-stable/contrib/netbsd-tests/fs/tmpfs/ |
H A D | t_renamerace.c | 41 int fd; local 45 fd = rump_sys_open("/file", O_CREAT | O_RDWR, 0777); 46 if (fd == -1) 48 rump_sys_close(fd); 63 int fd; local 68 fd = rump_sys_open("/dir/file1", O_RDWR); 69 if (fd != -1) 70 rump_sys_close(fd);
|
/freebsd-11-stable/usr.sbin/rtadvd/ |
H A D | control_client.c | 60 cm_handler_client(int fd, int state, char *buf_orig) argument 79 close(fd); 96 error = cm_send(fd, buf); 105 error = cm_recv(fd, buf); 109 close(fd); 120 close(fd); 125 close(fd); 133 close(fd);
|
/freebsd-11-stable/usr.bin/mkimg/ |
H A D | raw.c | 48 raw_write(int fd) argument 51 return (image_copyout(fd));
|
/freebsd-11-stable/contrib/file/src/ |
H A D | dprintf.c | 40 dprintf(int fd, const char *fmt, ...) argument 54 if (write(fd, buf, (size_t)len) != len)
|
/freebsd-11-stable/contrib/unbound/dnstap/ |
H A D | dtstream.h | 142 int fd; member in struct:dt_io_thread 149 /** check for nonblocking connect errors on fd */ 334 void dtio_reconnect_timeout_cb(int fd, short bits, void* arg); 337 void dtio_output_cb(int fd, short bits, void* arg); 340 void dtio_cmd_cb(int fd, short bits, void* arg); 343 void dtio_stop_timer_cb(int fd, short bits, void* arg); 346 void dtio_stop_ev_cb(int fd, short bits, void* arg); 349 void dtio_tap_callback(int fd, short bits, void* arg); 352 void dtio_mainfdcallback(int fd, short bits, void* arg);
|
/freebsd-11-stable/contrib/netbsd-tests/dev/md/ |
H A D | h_mdserv.c | 27 int fd, error; local 31 fd = rump_sys_open(arg, O_RDONLY); 33 n = rump_sys_read(fd, buf, sizeof(buf)); 68 int fd, error; local 86 if ((fd = rump_sys_open(argv[1], O_RDWR)) == -1) 103 if (rump_sys_ioctl(fd, MD_SETCONF, &md) == -1) {
|
/freebsd-11-stable/contrib/gcc/config/ |
H A D | host-hpux.c | 56 hpux_gt_pch_get_address (size_t size, int fd) argument 61 MAP_PRIVATE, fd, 0); 88 hpux_gt_pch_use_address (void *base, size_t size, int fd, size_t offset) argument 99 addr = mmap (base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, offset); 118 if (lseek (fd, offset, SEEK_SET) == (off_t)-1) 125 nbytes = read (fd, base, MIN (size, SSIZE_MAX));
|
/freebsd-11-stable/contrib/sendmail/test/ |
H A D | t_pathconf.c | 37 int fd; local 49 fd = mkstemp(tbuf); 50 if (fd < 0) 62 i = fpathconf(fd, _PC_CHOWN_RESTRICTED); 68 if (fchown(fd, 1, 1) >= 0) 77 if (fchown(fd, 1, 1) >= 0)
|
/freebsd-11-stable/lib/libc/stdio/ |
H A D | tmpfile.c | 56 int fd, sverrno; local 75 fd = mkstemp(buf); 76 if (fd != -1) 83 if (fd == -1) 86 if ((fp = fdopen(fd, "w+")) == NULL) { 88 (void)_close(fd);
|
/freebsd-11-stable/libexec/bootpd/ |
H A D | getether.c | 46 int fd; local 50 if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { 54 if (ioctl(fd, SIOCRPHYSADDR, &phys) < 0) { 60 close(fd); 128 int fd, rc = -1; 135 fd = socket(AF_INET, SOCK_DGRAM, 0); 136 if (fd < 0) { 138 return (fd); 142 if (ioctl(fd, SIOCGIFCONF, (char *) &ifc) < 0 || 167 close(fd); 126 int fd, rc = -1; local 196 int fd, flags; local 345 int fd; local [all...] |
/freebsd-11-stable/contrib/netbsd-tests/kernel/kqueue/read/ |
H A D | t_fifo.c | 60 int kq, n, fd; local 65 RL(fd = open(FIFONAME, O_RDWR, 0644)); 69 EV_SET(&event[0], fd, EVFILT_READ, EV_ADD|EV_ENABLE, 0, 0, 0); 73 RL(write(fd, "foo", 3)); 90 RL(n = read(fd, buffer, event[0].data)); 94 RL(close(fd));
|
/freebsd-11-stable/contrib/netbsd-tests/kernel/kqueue/write/ |
H A D | t_fifo.c | 63 int kq, n, fd, status; local 66 RL(fd = open(FIFONAME, O_RDWR, 0644)); 72 int sz = read(fd, buffer, 128); 78 EV_SET(&event[0], fd, EVFILT_WRITE, EV_ADD|EV_ENABLE, 0, 0, 0); 90 RL(write(fd, "foo", 3)); 92 RL(close(fd));
|
/freebsd-11-stable/usr.sbin/nandtool/ |
H A D | nand_readoob.c | 47 int fd = -1, fd_out = -1, ret = 0; local 69 if ((fd = g_open(dev, 1)) == -1) { 75 if (ioctl(fd, NAND_IO_GET_CHIP_PARAM, &chip_params) == -1) { 92 if (ioctl(fd, NAND_IO_OOB_READ, &req) == -1) { 106 if (fd != -1) 107 g_close(fd);
|
/freebsd-11-stable/contrib/apr/poll/unix/ |
H A D | select.c | 73 apr_os_sock_t fd; local 86 fd = aprset[i].desc.s->socketdes; 100 fd = aprset[i].desc.f->filedes; 108 if (fd >= FD_SETSIZE) { 114 FD_SET(fd, &readset); 117 FD_SET(fd, &writeset); 121 FD_SET(fd, &exceptset); 123 if ((int) fd > maxfd) { 124 maxfd = (int) fd; 151 apr_os_sock_t fd; local 229 apr_os_sock_t fd; local 298 apr_os_sock_t fd; local 397 apr_os_sock_t fd; local [all...] |
H A D | kqueue.c | 146 apr_os_sock_t fd; local 163 fd = descriptor->desc.s->socketdes; 166 fd = descriptor->desc.f->filedes; 170 EV_SET(&pollset->p->kevent, fd, EVFILT_READ, EV_ADD, 0, 0, elem); 179 EV_SET(&pollset->p->kevent, fd, EVFILT_WRITE, EV_ADD, 0, 0, elem); 204 apr_os_sock_t fd; local 209 fd = descriptor->desc.s->socketdes; 212 fd = descriptor->desc.f->filedes; 217 EV_SET(&pollset->p->kevent, fd, EVFILT_READ, EV_DELETE, 0, 0, NULL); 226 EV_SET(&pollset->p->kevent, fd, EVFILT_WRIT 282 const apr_pollfd_t *fd; local 341 int fd; local 377 apr_os_sock_t fd; local 412 apr_os_sock_t fd; local [all...] |