/freebsd-current/contrib/kyua/utils/process/ |
H A D | fdstream.cpp | 46 /// \param fd The file descriptor. 47 impl(const int fd) : _systembuf(fd) {} argument 62 /// \param fd The file descriptor to read from. Must be open and valid. 63 process::ifdstream::ifdstream(const int fd) : argument 65 _pimpl(new impl(fd))
|
/freebsd-current/contrib/dialog/ |
H A D | prgbox.c | 39 int fd[2]; local 41 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-current/contrib/diff/lib/ |
H A D | setmode.h | 25 # define set_binary_mode(fd, mode) true
|
/freebsd-current/crypto/heimdal/lib/roken/ |
H A D | closefrom.c | 46 closefrom(int fd) argument 53 for (; fd <= num; fd++) 54 close(fd);
|
H A D | daemon.c | 53 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-current/share/syscons/scrnmaps/ |
H A D | mkscrfil.c | 37 FILE *fd; local 40 if ((fd = fopen(argv[1], "w")) == NULL) { 44 fwrite(&scrmap, sizeof(scrmap_t), 1, fd); 45 fclose(fd);
|
/freebsd-current/usr.bin/tftp/ |
H A D | tftp.h | 32 int recvfile(int peer, char *port, int fd, char *name, char *mode); 33 int xmitfile(int peer, char *port, int fd, char *name, char *mode);
|
/freebsd-current/lib/libthr/thread/ |
H A D | thr_printf.c | 37 static void pchar(int fd, char c); 38 static void pstr(int fd, const char *s); 52 _thread_printf(int fd, const char *fmt, ...) argument 57 _thread_vprintf(fd, fmt, ap); 62 _thread_vprintf(int fd, const char *fmt, va_list ap) argument 84 pchar(fd, va_arg(ap, int)); 87 pstr(fd, va_arg(ap, char *)); 93 pstr(fd, "0x"); 100 pstr(fd, "0x"); 108 pchar(fd, ' 135 pchar(int fd, char c) argument 145 pstr(int fd, const char *s) argument [all...] |
/freebsd-current/sbin/ipf/libipf/ |
H A D | nametokva.c | 19 int fd; local 23 fd = -1; 26 fd = open(IPL_NAME, O_RDONLY); 27 if (fd == -1) 30 (void) (*iocfunc)(fd, SIOCFUNCL, &res); 31 if (fd >= 0) 32 close(fd);
|
H A D | kvatoname.c | 20 int fd; local 24 fd = -1; 27 fd = open(IPL_NAME, O_RDONLY); 28 if (fd == -1) 31 (void) (*iocfunc)(fd, SIOCFUNCL, &res); 32 if (fd >= 0) 33 close(fd);
|
H A D | connecttcp.c | 20 int fd; local 38 fd = socket(AF_INET, SOCK_STREAM, 0); 39 if (fd == -1) 42 if (connect(fd, (struct sockaddr *)&sin, sizeof(sin)) == -1) { 43 close(fd); 47 return (fd);
|
/freebsd-current/tools/regression/nfsmmap/test2/ |
H A D | test2.c | 8 int fd, fd2; local 17 fd = open("test2.data", O_RDWR|O_CREAT, 0666); 18 if (fd < 0) 20 if (write(fd, zeros, sizeof zeros) < 0) 22 close(fd); 25 fd = open("test2.data", O_RDWR); 26 if (fd < 0) 28 if (lseek(fd, 600, SEEK_SET) < 0) 31 if (write(fd, ones, sizeof ones) < 0) 34 addr = mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, [all...] |
/freebsd-current/usr.sbin/dumpcis/ |
H A D | main.c | 36 int fd; local 39 fd = open(name, O_RDONLY); 40 if (fd < 0) 42 tl = readcis(fd); 49 close(fd);
|
/freebsd-current/contrib/llvm-project/compiler-rt/lib/tsan/rtl/ |
H A D | tsan_fd.h | 41 void FdAcquire(ThreadState *thr, uptr pc, int fd); 42 void FdRelease(ThreadState *thr, uptr pc, int fd); 43 void FdAccess(ThreadState *thr, uptr pc, int fd); 44 void FdClose(ThreadState *thr, uptr pc, int fd, bool write = true); 45 void FdFileCreate(ThreadState *thr, uptr pc, int fd); 48 void FdEventCreate(ThreadState *thr, uptr pc, int fd); 49 void FdSignalCreate(ThreadState *thr, uptr pc, int fd); 50 void FdInotifyCreate(ThreadState *thr, uptr pc, int fd); 51 void FdPollCreate(ThreadState *thr, uptr pc, int fd); 52 void FdPollAdd(ThreadState *thr, uptr pc, int epfd, int fd); [all...] |
/freebsd-current/libexec/rtld-elf/rtld-libc/ |
H A D | rtld_libc.h | 49 int __sys_fstat(int fd, struct stat *); 71 #define close(fd) __sys_close(fd) 72 #define _close(fd) __sys_close(fd) 75 #define fcntl(fd, cmd, arg) __sys_fcntl(fd, cmd, arg) 76 #define _fcntl(fd, cmd, arg) __sys_fcntl(fd, cmd, arg) 77 #define _fstat(fd, s [all...] |
/freebsd-current/contrib/libfido2/openbsd-compat/ |
H A D | posix_win.h | 32 int posix_close(int fd); 34 ssize_t posix_read(int fd, void *buf, size_t count); 36 ssize_t posix_write(int fd, const void *buf, size_t count); 40 #define close(fd) posix_close(fd) 41 #define read(fd, buf, count) posix_read(fd, buf, count) 42 #define write(fd, buf, count) posix_write(fd, buf, count)
|
/freebsd-current/sys/contrib/openzfs/cmd/zed/ |
H A D | zed_file.c | 27 * Set an exclusive advisory lock on the open file descriptor [fd]. 32 zed_file_lock(int fd) argument 36 if (fd < 0) { 45 if (fcntl(fd, F_SETLK, &lock) < 0) { 55 * Release an advisory lock held on the open file descriptor [fd]. 59 zed_file_unlock(int fd) argument 63 if (fd < 0) { 72 if (fcntl(fd, F_SETLK, &lock) < 0) 80 * file descriptor [fd]. 85 zed_file_is_locked(int fd) argument 123 int fd; local [all...] |
/freebsd-current/tools/regression/ufs/uprintf/ |
H A D | ufs_uprintf.c | 70 int fd, i; local 72 fd = open(BLOCKS_FILENAME, O_CREAT | O_TRUNC | O_RDWR, 0600); 73 if (fd < 0) 83 len = write(fd, block, BLOCKSIZE); 89 close(fd); 97 close(fd); 107 len = write(fd, block, BLOCKSIZE); 110 close(fd); 116 close(fd); 130 int fd, local [all...] |
/freebsd-current/tools/test/stress2/misc/ |
H A D | fexecve.sh | 53 int fd; 58 fd = mkstemp(template); 59 if (fd < 0) 61 if (fchmod(fd, 0700) < 0) 63 if (ftruncate(fd, sz) < 0) 67 fd, 0); 74 if (ftruncate(fd, 0) != 0) 76 if (ftruncate(fd, sz) != 0) 79 (void)close(fd); 81 fd [all...] |
H A D | socketpair.sh | 65 send_fd(int unix_fd, int fd) 69 char buf[CMSG_SPACE(sizeof(fd))]; 77 cmsg->cmsg_len = CMSG_LEN(sizeof(fd)); 83 memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd)); 90 int fd[2], ff[2]; 92 if (socketpair(PF_UNIX, SOCK_SEQPACKET, 0, fd) == -1) 97 send_fd(ff[0], fd[0]); 98 send_fd(ff[0], fd[1]); 99 close(fd[ [all...] |
/freebsd-current/lib/libusbhid/ |
H A D | descr_compat.c | 51 hid_set_immed_compat7(int fd, int enable) argument 53 return (ioctl(fd, USB_SET_IMMED, &enable)); 57 hid_get_report_id_compat7(int fd) argument 61 if (ioctl(fd, USB_GET_REPORT_ID, &temp) < 0) 68 hid_get_report_desc_compat7(int fd) argument 73 if (ioctl(fd, USB_GET_REPORT_DESC, &rep) < 0)
|
/freebsd-current/stand/kboot/kboot/ |
H A D | init.c | 41 * Create compat links: /dev/fd lives in /proc, and needs some help to 44 host_symlink("/proc/self/fd", "/dev/fd"); 45 host_symlink("fd/0", "/dev/stdin"); 46 host_symlink("fd/1", "/dev/stdout"); 47 host_symlink("fd/2", "/dev/stderr"); 70 int fd; local 83 fd = host_open("/dev/console", HOST_O_RDWR | HOST_O_NOCTTY, 0); 84 host_dup(fd); 85 host_dup(fd); [all...] |
H A D | util.c | 14 int fd; local 17 fd = host_open(fn, HOST_O_RDONLY, 0); 18 if (fd == -1) 20 len = host_read(fd, buffer, buflen - 1); 22 host_close(fd); 31 host_close(fd);
|
/freebsd-current/usr.bin/tip/tip/ |
H A D | uucplock.c | 56 int fd, len; local 62 fd = open(tbuf, O_RDWR|O_CREAT|O_EXCL, 0660); 63 if (fd < 0) { 68 fd = open(tbuf, O_RDWR, 0); 69 if (fd < 0) { 74 len = read(fd, text_pid, sizeof(text_pid)-1); 77 (void)close(fd); 85 (void)close(fd); /* process is still running */ 94 if (lseek(fd, (off_t)0, SEEK_SET) < 0) { 96 (void)close(fd); [all...] |
/freebsd-current/contrib/ntp/include/ |
H A D | libntp.h | 9 * if we have no idea about the max fd value set up things 15 extern void make_socket_nonblocking( SOCKET fd ); 16 extern SOCKET move_fd( SOCKET fd );
|