/freebsd-11-stable/usr.bin/wall/ |
H A D | ttymsg.c | 64 int cnt, fd; local 89 if ((fd = open(device, O_WRONLY|O_NONBLOCK, 0)) < 0) { 101 wret = writev(fd, iov, iovcnt); 126 (void) close(fd); 133 (void) close(fd); 137 (void) close(fd); 146 (void) fcntl(fd, F_SETFL, 0); /* clear O_NONBLOCK */ 155 (void) close(fd); 163 (void) close(fd);
|
/freebsd-11-stable/usr.sbin/cron/lib/ |
H A D | compat.c | 95 int fd; local 101 if ((fd = open(_PATH_TTY, 2)) >= 0) 103 (void) ioctl(fd, TIOCNOTTY, (char*)0); 104 (void) close(fd); 140 * flock (fd, operation) 143 * on the object described by the int file descriptor 'fd', 171 flock(fd, operation) 172 int fd; 180 i = lockf (fd, F_LOCK, 0); 185 i = lockf (fd, F_TLOC [all...] |
/freebsd-11-stable/contrib/ipfilter/tools/ |
H A D | ipf.c | 51 static int fd = -1; variable 142 ipf_dotuning(fd, optarg, ioctl); 166 if (fd != -1) 167 (void) close(fd); 189 if (fd == -1) 190 if ((fd = open(ipfdev, O_RDWR)) == -1) 191 if ((fd = open(ipfdev, O_RDONLY)) == -1) 192 ipferror(fd, "open device"); 193 return fd; 199 close(fd); [all...] |
/freebsd-11-stable/contrib/netbsd-tests/crypto/opencrypto/ |
H A D | h_arc4.c | 49 int fd, res; local 54 fd = open("/dev/crypto", O_RDWR, 0); 55 if (fd < 0) 61 res = ioctl(fd, CIOCGSESSION, &cs); 72 res = ioctl(fd, CIOCCRYPT, &co);
|
H A D | h_cbcdes.c | 50 int fd, res; local 55 fd = open("/dev/crypto", O_RDWR, 0); 56 if (fd < 0) 62 res = ioctl(fd, CIOCGSESSION, &cs); 74 res = ioctl(fd, CIOCCRYPT, &co);
|
H A D | h_null.c | 45 int fd, res; local 50 fd = open("/dev/crypto", O_RDWR, 0); 51 if (fd < 0) 57 res = ioctl(fd, CIOCGSESSION, &cs); 68 res = ioctl(fd, CIOCCRYPT, &co);
|
/freebsd-11-stable/contrib/netbsd-tests/fs/common/ |
H A D | fstest_zfs.c | 55 int fd; local 67 if ((fd = open(image, O_RDWR | O_CREAT, 0777)) == -1) 69 if (ftruncate(fd, size) == -1) { 70 close(fd); 73 close(fd);
|
/freebsd-11-stable/contrib/netbsd-tests/lib/librumphijack/ |
H A D | h_netget.c | 58 int s, fd; local 77 fd = open(argv[3], O_CREAT | O_RDWR, 0644); 78 if (fd == -1) 80 if (ftruncate(fd, 0) == -1) 96 if (write(fd, buf, n) != n)
|
/freebsd-11-stable/contrib/wpa/src/wps/ |
H A D | http_server.c | 24 int fd; member in struct:http_request 33 int fd; member in struct:http_server 61 static struct http_request * http_request_init(struct http_server *srv, int fd, argument 76 req->fd = fd; 79 req->hread = httpread_create(req->fd, http_request_cb, req, 116 close(req->fd); 141 res = send(req->fd, wpabuf_head(resp), wpabuf_len(resp), 0); 207 conn = accept(srv->fd, (struct sockaddr *) &addr, &addr_len); 243 srv->fd [all...] |
/freebsd-11-stable/lib/libc/stdio/ |
H A D | fdopen.c | 50 fdopen(int fd, const char *mode) argument 58 * SHRT_MAX, then the fd will get sign-extended into an 62 if (fd > SHRT_MAX) { 71 if ((fdflags = _fcntl(fd, F_GETFL, 0)) < 0) 83 if ((oflags & O_CLOEXEC) && _fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) { 98 fp->_file = fd;
|
/freebsd-11-stable/crypto/openssh/openbsd-compat/ |
H A D | port-uw.c | 95 FILE *fd; local 98 if ((fd = fopen (password_file, "r")) == NULL) { 112 while (ent = fgetpwent(fd)) { 115 fclose (fd); 120 fclose (fd);
|
/freebsd-11-stable/lib/libc/iconv/ |
H A D | citrus_mmap.c | 56 int fd, ret; local 62 if ((fd = _open(path, O_RDONLY | O_CLOEXEC)) == -1) 65 if (_fstat(fd, &st) == -1) { 75 fd, (off_t)0); 83 (void)_close(fd);
|
/freebsd-11-stable/tools/regression/priv/ |
H A D | priv_io.c | 83 int error, fd; local 85 fd = open(DEV_IO, O_RDONLY); 86 if (fd < 0) 98 if (fd != -1) 99 close(fd);
|
/freebsd-11-stable/usr.bin/cksum/ |
H A D | cksum.c | 65 int ch, fd, rval; local 108 fd = STDIN_FILENO; 114 if ((fd = open(fn, O_RDONLY, 0)) < 0) { 120 if (cfncn(fd, &val, &len)) { 125 (void)close(fd);
|
/freebsd-11-stable/share/examples/ses/srcs/ |
H A D | setobjstat.c | 48 int fd; local 60 fd = open(v[1], O_RDWR); 61 if (fd < 0) { 79 if (ioctl(fd, ENCIOC_SETELMSTAT, (caddr_t) &obj) < 0) { 82 (void) close(fd);
|
/freebsd-11-stable/tools/tools/ath/arcode/ |
H A D | arcode.c | 76 int fd; local 85 fd = open(file, O_RDONLY); 86 if (fd < 0) { 92 r = read(fd, &a, sizeof(a)); 113 close(fd);
|
/freebsd-11-stable/tools/regression/sockets/unix_cmsg/ |
H A D | uc_common.h | 67 int uc_message_recv(int fd, struct msghdr *msghdr); 68 int uc_message_send(int fd, const struct msghdr *msghdr); 69 int uc_message_sendn(int fd, struct msghdr *msghdr); 76 int uc_socket_close(int fd); 77 int uc_socket_connect(int fd);
|
/freebsd-11-stable/lib/libc/gen/ |
H A D | ttyname.c | 60 ttyname_r(int fd, char *buf, size_t len) argument 71 if (!isatty(fd)) 79 if (fdevname_r(fd, buf + used, len - used) == NULL) 91 ttyname(int fd) argument 111 if (ttyname_r(fd, buf, sizeof ttyname_buf) != 0)
|
/freebsd-11-stable/contrib/netbsd-tests/fs/vfs/ |
H A D | t_full.c | 57 int fd, i = 0; local 70 fd = rump_sys_open("afile", O_CREAT | O_RDWR); 71 if (fd == -1) 76 n = rump_sys_write(fd, buf, sizeof(buf)); 89 rump_sys_close(fd);
|
/freebsd-11-stable/usr.sbin/nandtool/ |
H A D | nand_writeoob.c | 46 int fd = -1, fd_in = -1, ret = 0; local 65 if ((fd = g_open(dev, 1)) == -1) { 76 if (ioctl(fd, NAND_IO_GET_CHIP_PARAM, &chip_params) == -1) { 99 if (ioctl(fd, NAND_IO_OOB_PROG, &req) == -1) { 106 g_close(fd);
|
H A D | nand_info.c | 44 int fd = -1, ret = 0; local 55 if ((fd = g_open(dev, 1)) == -1) { 60 if (ioctl(fd, NAND_IO_GET_CHIP_PARAM, &chip_params) == -1) { 66 if (ioctl(fd, DIOCGMEDIASIZE, &media_size) == -1) { 85 g_close(fd);
|
/freebsd-11-stable/usr.sbin/fdread/ |
H A D | fdread.c | 52 static int doread(int fd, FILE *of, const char *_devname); 53 static int doreadid(int fd, unsigned int numids, unsigned int trackno); 74 int fd; local 154 if ((fd = open(_devname, O_RDONLY)) == -1) 157 return (numids? doreadid(fd, numids, trackno): doread(fd, of, _devname)); 161 doread(int fd, FILE *of, const char *_devname) argument 169 if (ioctl(fd, FD_GTYPE, &fdt) == -1) 183 if (lseek(fd, nbytes, SEEK_SET) != nbytes) 185 rv = read(fd, trackbu 304 doreadid(int fd, unsigned int numids, unsigned int trackno) argument [all...] |
/freebsd-11-stable/usr.sbin/mlxcontrol/ |
H A D | interface.c | 49 int i, fd; local 54 if ((fd = open(ctrlrpath(i), 0)) >= 0) 55 close(fd); 57 if (fd >= 0) { 64 * Open the controller (unit) and give the fd to (func) along with (arg) 67 mlx_perform(int unit, void (*func)(int fd, void *arg), void *arg) argument 69 int fd; local 71 if ((fd = open(ctrlrpath(unit), 0)) >= 0) { 72 func(fd, arg); 73 close(fd); 84 int i, fd, ctrlfd; local 131 int i, fd; local 173 mlx_command(int fd, void *arg) argument [all...] |
/freebsd-11-stable/sbin/nvmecontrol/ |
H A D | devlist.c | 71 int ch, ctrlr, fd, found, ret; local 87 ret = open_dev(name, &fd, 0, 0); 96 read_controller_data(fd, &cdata); 103 read_namespace_data(fd, i+1, &nsdata); 111 close(fd);
|
/freebsd-11-stable/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_common_interceptors_netbsd_compat.inc | 45 INTERCEPTOR(int, fstatvfs, int fd, void *buf) { 47 COMMON_INTERCEPTOR_ENTER(ctx, fstatvfs, fd, buf); 48 COMMON_INTERCEPTOR_FD_ACCESS(ctx, fd); 52 int res = REAL(fstatvfs)(fd, buf); 55 if (fd >= 0) 56 COMMON_INTERCEPTOR_FD_ACQUIRE(ctx, fd); 108 INTERCEPTOR(int, fstatvfs1, int fd, void *buf, int flags) { 110 COMMON_INTERCEPTOR_ENTER(ctx, fstatvfs1, fd, buf, flags); 111 COMMON_INTERCEPTOR_FD_ACCESS(ctx, fd); 112 int res = REAL(fstatvfs1)(fd, bu [all...] |