/freebsd-11-stable/usr.sbin/bhyve/ |
H A D | sockstream.h | 34 ssize_t stream_read(int fd, void *buf, ssize_t nbytes); 35 ssize_t stream_write(int fd, const void *buf, ssize_t nbytes);
|
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/sys/ |
H A D | t_fsync.c | 52 int i, fd[2]; local 56 * when the 'fd' is not a valid descriptor. 71 ATF_REQUIRE(pipe(fd) == 0); 75 ATF_REQUIRE(fsync(fd[0]) == -1); 80 ATF_REQUIRE(fsync(fd[1]) == -1); 83 ATF_REQUIRE(close(fd[0]) == 0); 84 ATF_REQUIRE(close(fd[1]) == 0); 96 int fd, i; local 102 fd = mkstemp(buf); 104 ATF_REQUIRE(fd ! [all...] |
/freebsd-11-stable/lib/libc/stdio/ |
H A D | fileno.c | 50 int fd; local 53 fd = __sfileno(fp); 56 return (fd);
|
/freebsd-11-stable/lib/libfigpar/ |
H A D | figpar.c | 107 int fd; local 142 if ((fd = open(rpath, O_RDONLY)) < 0) 147 r = read(fd, p, 1); 158 r = read(fd, p, 1); 162 close(fd); 167 curpos = lseek(fd, 0, SEEK_CUR) - 1; 169 close(fd); 183 r = read(fd, p, 1); 188 close(fd); 193 error = (int)lseek(fd, curpo [all...] |
/freebsd-11-stable/lib/libusbhid/ |
H A D | usbvar.h | 43 int hid_set_immed_compat7(int fd, int enable); 44 int hid_get_report_id_compat7(int fd); 45 report_desc_t hid_get_report_desc_compat7(int fd);
|
/freebsd-11-stable/tests/sys/kern/pipe/ |
H A D | big_pipe_test.c | 20 write_frame(int fd, char *buf, unsigned long buflen) argument 27 FD_SET(fd, &wfd); 28 i = select(fd+1, NULL, &wfd, NULL, NULL); 35 i = write(fd, buf, buflen); 51 int i, flags, fd[2]; local 53 if (pipe(fd) < 0) 56 flags = fcntl(fd[1], F_GETFL); 57 if (flags == -1 || fcntl(fd[1], F_SETFL, flags|O_NONBLOCK) == -1) { 67 close(fd[1]); 70 i = read(fd[ [all...] |
/freebsd-11-stable/sys/compat/linuxkpi/common/include/linux/ |
H A D | file.h | 51 linux_fget(unsigned int fd) argument 57 if (fget_unlocked(curthread->td_proc->p_fd, fd, 89 put_unused_fd(unsigned int fd) argument 94 if (fget_unlocked(curthread->td_proc->p_fd, fd, 99 * NOTE: We should only get here when the "fd" has not been 103 fdclose(curthread, file, fd); 110 fd_install(unsigned int fd, struct linux_file *filp) argument 115 if (fget_unlocked(curthread->td_proc->p_fd, fd, 136 int fd; local 138 error = falloc(curthread, &file, &fd, 151 int fd; local 175 struct fd { struct 179 fdput(struct fd fd) argument 184 fdget(unsigned int fd) argument [all...] |
/freebsd-11-stable/contrib/netbsd-tests/fs/vfs/ |
H A D | t_io.c | 53 int fd; local 57 RL(fd = rump_sys_open("file", O_RDWR|O_CREAT|O_TRUNC, 0666)); 60 RL(rump_sys_pwrite(fd, buf, 1, getpagesize())); 63 RL(rump_sys_pwrite(fd, buf, 2, getpagesize()-1)); 68 RL(rump_sys_pread(fd, b2, therange, 0)); 75 rump_sys_close(fd); 84 int fd; local 87 RL(fd = rump_sys_open("testfile", 89 RL(rump_sys_ftruncate(fd, seekcnt)); 90 RL(rump_sys_fstat(fd, 121 int fd; local 161 int fd; local 176 int fd; local 204 int fd; local 229 int fd; local [all...] |
/freebsd-11-stable/tools/regression/audit/audit_pipe_ioctl/ |
H A D | audit_pipe_ioctl.c | 50 int fd; local 52 fd = open("/dev/auditpipe", O_RDONLY); 53 if (fd < 0) 61 if (ioctl(fd, AUDITPIPE_GET_QLEN, &len) < 0) 67 if (ioctl(fd, AUDITPIPE_GET_QLIMIT_MIN, &minlen) < 0) 73 if (ioctl(fd, AUDITPIPE_GET_QLIMIT_MAX, &maxlen) < 0) 79 if (ioctl(fd, AUDITPIPE_GET_QLIMIT, &len) < 0) 95 if (ioctl(fd, AUDITPIPE_SET_QLIMIT, &len) < 0) 98 if (ioctl(fd, AUDITPIPE_GET_QLIMIT, &len) < 0) 105 if (ioctl(fd, AUDITPIPE_SET_QLIMI [all...] |
/freebsd-11-stable/tools/tools/ath/athprom/ |
H A D | athprom.c | 62 static void parseTemplate(FILE *ftemplate, FILE *fd); 77 FILE *fd; local 82 fd = fopen(filename, "r"); 83 if (fd == NULL && errno == ENOENT) { 87 fd = fopen(filename, "r"); 88 if (fd != NULL) /* XXX verbose */ 91 return fd; 97 FILE *fd = NULL; local 115 fd = fopen(optarg, "r"); 116 if (fd 227 token(FILE *fd, char id[], int maxid, const char *what) argument 253 skipto(FILE *fd, const char *what) argument 285 skipws(FILE *fd) argument 379 printAntennaControl(FILE *fd, int ant) argument 385 printEdge(FILE *fd, int edge) argument 397 printEdgePower(FILE *fd, int edge) argument 411 printEdgeFlag(FILE *fd, int edge) argument 437 printQuarterDbmPower(FILE *fd, int16_t power25dBm) argument 443 printHalfDbmPower(FILE *fd, int16_t power5dBm) argument 449 printVpd(FILE *fd, int vpd) argument 455 printPcdacValue(FILE *fd, int v) argument 488 eevar(FILE *fd, const char *var) argument 869 parseTemplate(FILE *ftemplate, FILE *fd) argument [all...] |
/freebsd-11-stable/share/examples/ses/srcs/ |
H A D | getnobj.c | 50 int fd; local 54 fd = open(name, O_RDONLY); 55 if (fd < 0) { 59 if (ioctl(fd, SESIOC_GETNOBJ, (caddr_t) &nobj) < 0) { 64 close (fd);
|
H A D | inienc.c | 48 int fd; local 51 fd = open(*v, O_RDWR); 52 if (fd < 0) { 56 if (ioctl(fd, SESIOC_INIT, NULL) < 0) { 59 (void) close(fd);
|
H A D | setencstat.c | 48 int fd; local 56 fd = open(v[1], O_RDWR); 57 if (fd < 0) { 64 if (ioctl(fd, ENCIOC_SETENCSTAT, (caddr_t) &stat) < 0) { 67 (void) close(fd);
|
/freebsd-11-stable/contrib/netbsd-tests/fs/ffs/ |
H A D | t_fifos.c | 35 int fd; local 37 fd = rump_sys_open("sheep", O_WRONLY); 38 if (fd == -1) 40 if (rump_sys_write(fd, teststr1, sizeof(teststr1)) != sizeof(teststr1)) 42 rump_sys_close(fd); 50 int fd; local 52 fd = rump_sys_open("pigs", O_WRONLY); 53 if (fd == -1) 55 if (rump_sys_write(fd, teststr2, sizeof(teststr2)) != sizeof(teststr2)) 57 rump_sys_close(fd); 66 int fd; local 85 int fd; local [all...] |
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/ |
H A D | srr.c | 53 server_prepare_service_register_response(server_p srv, int32_t fd) argument 57 uint8_t *rsp = srv->fdidx[fd].rsp; 71 if (!srv->fdidx[fd].control || 72 !srv->fdidx[fd].priv || req_end - req < 8) 94 provider = provider_register(profile, bdaddr, fd, req, req_end - req); 102 srv->fdidx[fd].rsp_limit = srv->fdidx[fd].omtu - sizeof(sdp_pdu_t); 103 srv->fdidx[fd].rsp_size = rsp - srv->fdidx[fd].rsp; 104 srv->fdidx[fd] 114 server_send_service_register_response(server_p srv, int32_t fd) argument [all...] |
H A D | sur.c | 49 server_prepare_service_unregister_response(server_p srv, int32_t fd) argument 53 uint8_t *rsp = srv->fdidx[fd].rsp; 64 if (!srv->fdidx[fd].control || 65 !srv->fdidx[fd].priv || req_end - req < 4) 73 if (provider == NULL || provider->fd != fd) 80 srv->fdidx[fd].rsp_limit = srv->fdidx[fd].omtu - sizeof(sdp_pdu_t); 81 srv->fdidx[fd].rsp_size = rsp - srv->fdidx[fd] [all...] |
H A D | scr.c | 49 server_prepare_service_change_response(server_p srv, int32_t fd) argument 53 uint8_t *rsp = srv->fdidx[fd].rsp; 64 if (!srv->fdidx[fd].control || 65 !srv->fdidx[fd].priv || req_end - req < 4) 73 if (provider == NULL || provider->fd != fd) 89 srv->fdidx[fd].rsp_limit = srv->fdidx[fd].omtu - sizeof(sdp_pdu_t); 90 srv->fdidx[fd].rsp_size = rsp - srv->fdidx[fd] [all...] |
/freebsd-11-stable/usr.sbin/dumpcis/ |
H A D | main.c | 38 int fd; local 41 fd = open(name, O_RDONLY); 42 if (fd < 0) 44 tl = readcis(fd); 51 close(fd);
|
/freebsd-11-stable/contrib/tcp_wrappers/ |
H A D | ptx.c | 51 if (getpeerinaddr(request->fd, &client, sizeof(client)) == 0 54 if (getmyinaddr(request->fd, &server, sizeof(server)) == 0) { 72 if (SWAP_MODULE(request->fd, "timod", "sockmod") != 0) 75 if (SWAP_MODULE(request->fd, "sockmod", "timod") != 0) 84 static void ptx_sink(fd) 85 int fd; 96 if (ioctl(fd, I_FIND, "timod") != 0) 97 ioctl(fd, I_POP, "timod"); 98 if (ioctl(fd, I_FIND, "sockmod") == 0) 99 ioctl(fd, I_PUS [all...] |
/freebsd-11-stable/contrib/openbsm/compat/ |
H A D | flopen.h | 40 int fd, operation, serrno, trunc; local 65 if ((fd = open(path, flags, mode)) == -1) 68 if (flock(fd, operation) == -1) { 71 (void)close(fd); 77 (void)close(fd); 80 if (fstat(fd, &fsb) == -1) { 83 (void)close(fd); 90 (void)close(fd); 93 if (trunc && ftruncate(fd, 0) != 0) { 96 (void)close(fd); [all...] |
/freebsd-11-stable/lib/libutil/ |
H A D | flopen.c | 43 int fd, operation, serrno, trunc; local 68 if ((fd = open(path, flags, mode)) == -1) 71 if (flock(fd, operation) == -1) { 74 (void)close(fd); 80 (void)close(fd); 83 if (fstat(fd, &fsb) == -1) { 86 (void)close(fd); 93 (void)close(fd); 96 if (trunc && ftruncate(fd, 0) != 0) { 99 (void)close(fd); [all...] |
/freebsd-11-stable/crypto/openssh/openbsd-compat/ |
H A D | bsd-closefrom.c | 71 long fd, maxfd; local 78 /* Check for a /proc/$$/fd directory. */ 79 len = snprintf(fdpath, sizeof(fdpath), "/proc/%ld/fd", (long)getpid()); 82 fd = strtol(dent->d_name, &endp, 10); 84 fd >= 0 && fd < INT_MAX && fd >= lowfd && fd != dirfd(dirp)) 85 (void) close((int) fd); 94 * and then drop the rlimit such that it is below the open fd [all...] |
/freebsd-11-stable/crypto/heimdal/lib/roken/ |
H A D | dumpdata.c | 45 int fd; local 47 fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0640); 48 if (fd < 0) 50 net_write(fd, buf, size); 51 close(fd); 62 int fd, ret; local 67 fd = open(filename, O_RDONLY, 0); 68 if (fd < 0) 70 if (fstat(fd, &sb) != 0){ 81 sret = net_read(fd, *bu [all...] |
/freebsd-11-stable/contrib/netbsd-tests/kernel/ |
H A D | t_rnd.c | 55 int fd; local 58 fd = rump_sys_open("/dev/random", O_RDWR, 0); 59 if (fd == -1) 64 if (rump_sys_ioctl(fd, RNDADDDATA, &rd) == -1) 77 int fd; local 80 fd = rump_sys_open("/dev/random", O_RDWR, 0); 81 if (fd == -1) 86 ATF_REQUIRE_ERRNO(EINVAL, rump_sys_ioctl(fd, RNDADDDATA, &rd) == -1); 100 int fd; local 103 RL(fd [all...] |
/freebsd-11-stable/contrib/expat/xmlwf/ |
H A D | unixfilemap.c | 59 int fd; local 64 fd = topen(name, O_RDONLY); 65 if (fd < 0) { 69 if (fstat(fd, &sb) < 0) { 71 close(fd); 75 close(fd); 80 close(fd); 89 close(fd); 93 fd, (off_t)0); 96 close(fd); [all...] |