/freebsd-11-stable/lib/libc/stdio/ |
H A D | mktemp.c | 58 int fd; local 60 return (_gettemp(path, &fd, 0, slen, oflags) ? fd : -1); 66 int fd; local 68 return (_gettemp(path, &fd, 0, slen, 0) ? fd : -1); 74 int fd; local 76 return (_gettemp(path, &fd, 0, 0, oflags) ? fd : -1); 82 int fd; local [all...] |
/freebsd-11-stable/lib/libc/gen/ |
H A D | closedir.c | 54 int fd; local 58 fd = dirp->dd_fd; 68 return (fd);
|
/freebsd-11-stable/crypto/openssh/ |
H A D | atomicio.c | 52 atomicio6(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n, argument 61 pfd.fd = fd; 65 res = (f) (fd, s + pos, n - pos); 92 atomicio(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n) argument 94 return atomicio6(f, fd, _s, n, NULL, NULL); 101 atomiciov6(ssize_t (*f) (int, const struct iovec *, int), int fd, argument 118 pfd.fd = fd; 122 res = (f) (fd, io 166 atomiciov(ssize_t (f) int, const struct iovec *, int), int fd, const struct iovec *_iov, int iovcnt) argument [all...] |
H A D | sshpty.c | 101 int fd; local 107 fd = open(tty, O_RDWR|O_NOCTTY); 108 if (fd != -1) { 110 ioctl(fd, TCVHUP, (char *)NULL); 113 close(fd); 120 fd = open("/dev/tty", O_RDWR); 121 if (fd < 0) 124 *ttyfd = fd; 129 fd = open(_PATH_TTY, O_RDWR | O_NOCTTY); 130 if (fd > 247 int fd; local [all...] |
/freebsd-11-stable/contrib/netbsd-tests/kernel/kqueue/read/ |
H A D | t_file.c | 61 int i, n, fd; local 66 fd = open(FILENAME, O_WRONLY|O_APPEND, 0644); 67 if (fd < 0) 70 n = write(fd, "foo\n", 4); 74 (void)close(fd); 90 int fd, kq, n, num, status; local 98 RL(fd = open(FILENAME, O_RDONLY|O_CREAT, 0644)); 101 RL(lseek(fd, 0, SEEK_END)); 106 EV_SET(&event[0], fd, EVFILT_READ, EV_ADD|EV_ENABLE, 0, 0, 0); 123 RL(lseek(fd, [all...] |
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/c063/ |
H A D | t_mknodat.c | 67 atf_tc_set_md_var(tc, "descr", "See that mknodat works with fd"); 73 int fd; local 80 ATF_REQUIRE((fd = mknodat(dfd, BASEFILE, mode, dev)) != -1); 81 ATF_REQUIRE(close(fd) == 0); 90 "See that mknodat works with fd as AT_FDCWD"); 95 int fd; local 101 ATF_REQUIRE((fd = mknodat(AT_FDCWD, FILE, mode, dev)) != -1); 102 ATF_REQUIRE(close(fd) == 0); 110 "See that mknodat fails with fd as AT_FDCWD and bad path"); 115 int fd; local 131 int fd; local [all...] |
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/ssp/ |
H A D | h_read.c | 45 int fd, n; local 48 if ((fd = open(_PATH_DEVZERO, O_RDONLY)) == -1) 50 if ((n = read(fd, b, len)) == -1)
|
/freebsd-11-stable/sbin/nvmecontrol/ |
H A D | reset.c | 55 int ch, fd; local 68 open_dev(argv[optind], &fd, 1, 1); 69 if (ioctl(fd, NVME_RESET_CONTROLLER) < 0)
|
/freebsd-11-stable/stand/i386/libi386/ |
H A D | pread.c | 54 pread(fd, dest, size) 55 int fd; 67 got = read(fd, buf, count);
|
/freebsd-11-stable/contrib/llvm-project/lldb/include/lldb/Host/ |
H A D | FileAction.h | 30 bool Close(int fd); 32 bool Duplicate(int fd, int dup_fd); 34 bool Open(int fd, const FileSpec &file_spec, bool read, bool write);
|
/freebsd-11-stable/lib/libopenbsd/ |
H A D | imsg.c | 38 imsg_init(struct imsgbuf *ibuf, int fd) argument 42 ibuf->fd = fd; 43 ibuf->w.fd = fd; 59 int fd; local 84 if ((n = recvmsg(ibuf->fd, &msg, 0)) == -1) { 102 * more than one fd, and we must close them. 107 fd = ((int *)CMSG_DATA(cmsg))[i]; 109 ifd->fd 168 imsg_compose(struct imsgbuf *ibuf, u_int32_t type, u_int32_t peerid, pid_t pid, int fd, const void *data, u_int16_t datalen) argument 187 imsg_composev(struct imsgbuf *ibuf, u_int32_t type, u_int32_t peerid, pid_t pid, int fd, const struct iovec *iov, int iovcnt) argument 274 int fd; local 299 int fd; local [all...] |
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/sys/ |
H A D | t_chroot.c | 56 int fd, sta; local 82 fd = open("file", O_RDONLY | O_CREAT, 0600); 84 if (fd < 0) 87 if (close(fd) != 0) 101 fd = open(buf, O_RDONLY); 103 if (fd < 0) 106 ATF_REQUIRE(close(fd) == 0); 182 int fd, sta; local 192 fd = open(buf, O_RDONLY); 193 ATF_REQUIRE(fd > 243 int fd; local 268 int fd, sta; local [all...] |
H A D | t_stat.c | 62 int fd; local 67 fd = open(path, O_RDONLY | O_CREAT, 0600); 69 ATF_REQUIRE(fd != -1); 77 ATF_REQUIRE(close(fd) == 0); 205 int fd[3]; local 208 for (i = 0; i < __arraycount(fd); i++) { 213 fd[i] = open(path, O_WRONLY | O_CREAT, 0600); 215 ATF_REQUIRE(fd[i] != -1); 216 ATF_REQUIRE(write(fd[i], "X", 1) == 1); 221 ATF_REQUIRE(write(fd[ 249 int fd; local 289 int fd; local 333 int fd, flags; local 375 int fd; local [all...] |
H A D | t_mmap.c | 176 int fd = -1; local 188 if ((fd = open(dev, O_RDONLY)) >= 0) { 195 if (fd < 0) 198 map = mmap(NULL, 4096, PROT_READ, MAP_FILE, fd, 0); 202 ATF_REQUIRE(close(fd) == 0); 249 int fd; local 251 fd = open(path, O_RDWR | O_CREAT, 0600); 252 ATF_REQUIRE(fd >= 0); 255 (void)write(fd, buf, sizeof(buf)); 258 MAP_FILE | MAP_PRIVATE, fd, 298 int fd; local 369 int fd, sta; local 425 int fd; local 472 int fd, sta; local [all...] |
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/ |
H A D | sar.c | 145 server_prepare_service_attribute_response(server_p srv, int32_t fd) argument 149 uint8_t *rsp = srv->fdidx[fd].rsp; 211 if (srv->fdidx[fd].rsp_cs != cs) 213 if (srv->fdidx[fd].rsp_size > 0) 234 srv->fdidx[fd].rsp_limit = srv->fdidx[fd].omtu - sizeof(sdp_pdu_t) - 2; 235 if (srv->fdidx[fd].rsp_limit > rsp_limit) 236 srv->fdidx[fd].rsp_limit = rsp_limit; 238 srv->fdidx[fd].rsp_size = cs; 239 srv->fdidx[fd] 249 server_send_service_attribute_response(server_p srv, int32_t fd) argument [all...] |
H A D | server.c | 57 static void server_accept_client (server_p srv, int32_t fd); 58 static int32_t server_process_request (server_p srv, int32_t fd); 59 static int32_t server_send_error_response (server_p srv, int32_t fd, 61 static void server_close_fd (server_p srv, int32_t fd); 174 log_crit("Could not allocate fd index"); 231 int fd; local 235 for (fd = 0; fd < srv->maxfd + 1; fd ++) 236 if (srv->fdidx[fd] 253 int32_t n, fd; local 293 server_accept_client(server_p srv, int32_t fd) argument 409 server_process_request(server_p srv, int32_t fd) argument 538 server_send_error_response(server_p srv, int32_t fd, uint16_t error) argument 565 server_close_fd(server_p srv, int32_t fd) argument [all...] |
H A D | ssr.c | 54 server_prepare_service_search_response(server_p srv, int32_t fd) argument 58 uint8_t *rsp = srv->fdidx[fd].rsp; 121 if (srv->fdidx[fd].rsp_cs != cs) 123 if (srv->fdidx[fd].rsp_size > 0) 204 srv->fdidx[fd].rsp_limit = srv->fdidx[fd].omtu - sizeof(sdp_pdu_t) - 4; 205 srv->fdidx[fd].rsp_size = ptr - rsp; 206 srv->fdidx[fd].rsp_cs = 0; 216 server_send_service_search_response(server_p srv, int32_t fd) argument 218 uint8_t *rsp = srv->fdidx[fd] [all...] |
/freebsd-11-stable/contrib/netbsd-tests/net/fdpass/ |
H A D | fdpass.c | 47 send_fd(int sock, int fd) argument 71 *(int *)CMSG_DATA(cmsg) = fd; 79 pfd.fd = sock; 87 err(1, "%s: sendmsg(%d)", __func__, fd); 90 fprintf(stderr, "%d: send fd %d\n", getpid(), fd); 110 int fd; local 125 pfd.fd = sock; 148 fd = (*(int *)CMSG_DATA(cmsg)); 150 fprintf(stderr, "%d: recv fd 167 int s[2], fd, status, c, verbose; local [all...] |
/freebsd-11-stable/lib/libutil/ |
H A D | uucplock.c | 58 static int put_pid (int fd, pid_t pid); 59 static pid_t get_pid (int fd,int *err); 68 int fd, tmpfd, i; local 92 if ((fd = open(lckname, O_RDONLY | O_CLOEXEC)) < 0) 95 if ((pid_old = get_pid (fd, &err)) == -1) 98 close(fd); 119 (void)close(fd); 131 int fd, err; local 136 if ((fd = open(lckname, O_RDWR | O_CLOEXEC)) < 0) 138 if (get_pid(fd, 200 put_pid(int fd, pid_t pid) argument 210 get_pid(int fd, int *err) argument [all...] |
/freebsd-11-stable/crypto/heimdal/lib/roken/ |
H A D | test-mem.c | 54 int fd; member in struct:__anon6065 72 int fd; local 75 fd = open("/dev/stdout", O_WRONLY, 0600); 76 if (fd >= 0) { 77 (void)write(fd, msg, sizeof(msg) - 1); 78 (void)write(fd, testname, strlen(testname)); 79 (void)write(fd, "\n", 1); 80 close(fd); 113 int flags, ret, fd; 122 fd [all...] |
/freebsd-11-stable/usr.sbin/apm/ |
H A D | apm.c | 116 apm_suspend(int fd) argument 118 if (ioctl(fd, APMIO_SUSPEND, NULL) == -1) 123 apm_standby(int fd) argument 125 if (ioctl(fd, APMIO_STANDBY, NULL) == -1) 130 apm_getinfo(int fd, apm_info_t aip) argument 132 if (ioctl(fd, APMIO_GETINFO, aip) == -1) 137 apm_enable(int fd, int enable) argument 140 if (ioctl(fd, APMIO_ENABLE) == -1) 143 if (ioctl(fd, APMIO_DISABLE) == -1) 193 print_all_info(int fd, apm_info_ argument 334 apm_display(int fd, int newstate) argument 341 apm_haltcpu(int fd, int enable) argument 353 apm_set_timer(int fd, int delta) argument 383 int c, fd; local [all...] |
/freebsd-11-stable/contrib/llvm-project/compiler-rt/lib/profile/ |
H A D | InstrProfilingUtil.c | 125 COMPILER_RT_VISIBILITY int lprofLockFd(int fd) { argument 135 while (fcntl(fd, F_SETLKW, &s_flock) == -1) { 145 flock(fd, LOCK_EX); 150 COMPILER_RT_VISIBILITY int lprofUnlockFd(int fd) { argument 160 while (fcntl(fd, F_SETLKW, &s_flock) == -1) { 170 flock(fd, LOCK_UN); 176 int fd; local 178 fd = _fileno(F); 180 fd = fileno(F); 182 return lprofLockFd(fd); 186 int fd; local 197 int fd; local [all...] |
/freebsd-11-stable/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_file.cpp | 38 if (fd == kStdoutFd || fd == kStderrFd) return; 44 if (fd != kInvalidFd) { 51 CloseFile(fd); 61 fd = OpenFile(full_path, WrOnly); 62 if (fd == kInvalidFd) { 83 if (fd != kStdoutFd && fd != kStderrFd && fd != kInvalidFd) 84 CloseFile(fd); 110 fd_t fd = OpenFile(file_name, RdOnly, errno_p); local 146 fd_t fd = OpenFile(file_name, RdOnly, errno_p); local 209 __sanitizer_set_report_fd(void *fd) argument [all...] |
/freebsd-11-stable/contrib/ntp/ntpd/ |
H A D | refclock_arbiter.c | 23 #define write(fd, data, octets) async_write(fd, data, octets) 159 int fd; local 166 fd = refclock_open(device, SPEED232, LDISC_CLK); 167 if (fd <= 0) 178 pp->io.fd = fd; 180 close(fd); 181 pp->io.fd = -1; 195 close(fd); [all...] |
/freebsd-11-stable/usr.sbin/bluetooth/btpand/ |
H A D | server.c | 159 int fd, n; local 163 fd = accept(s, (struct sockaddr *)&ra, &len); 164 if (fd == -1) 168 if (ioctl(fd, FIONBIO, &n) == -1) { 170 close(fd); 175 if (getsockopt(fd, SOL_L2CAP, SO_L2CAP_IMTU, &mru, &len) == -1) { 177 close(fd); 182 close(fd); 187 if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &n, &len) == -1) { 189 close(fd); [all...] |