/freebsd-11-stable/tests/sys/kern/ |
H A D | unix_passfd_test.c | 75 int fd; local 77 fd = open("/dev/null", O_RDONLY); 78 ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); 79 *fdp = fd; 86 int fd; local 90 fd = mkstemp(path); 91 ATF_REQUIRE_MSG(fd != -1, "mkstemp(%s) failed", path); 93 *fdp = fd; 97 dofstat(int fd, struct stat *sb) argument 100 ATF_REQUIRE_MSG(fstat(fd, s 122 putfds(char *buf, int fd, int nfds) argument 263 int fd[2], getfd, putfd; local 285 int fd[2], getfd, putfd; local 306 int fd[2], putfd; local 323 int fd[2], getfd_1, getfd_2, putfd_1, putfd_2; local 352 int fd[2], getfd; local 370 int fd[2]; local 385 int fd[2], putfd; local 409 int fd[2], getfd, putfd, rc; local 501 int fd[2], nfds, putfd, rc; local 592 int fd[2], error, nfds, putfd; local [all...] |
/freebsd-11-stable/usr.sbin/trim/ |
H A D | trim.c | 50 static bool candelete(int fd); 140 candelete(int fd) argument 146 if (ioctl(fd, DIOCGATTR, &arg) == 0) 155 int fd; local 158 if ((fd = open(path, flags)) < 0) { 162 fd = open(tstr, flags); 167 if (fd < 0) 170 return (fd); 178 int fd; local 180 fd 209 int error, fd; local [all...] |
/freebsd-11-stable/contrib/netbsd-tests/fs/ffs/ |
H A D | h_quota2_tests.c | 35 int fd; local 61 fd = rump_sys_open("test_fillup", O_CREAT | O_RDWR, 0644); 62 if (fd < 0) { 66 while (rump_sys_write(fd, buf, sizeof(buf)) == sizeof(buf)) 70 rump_sys_close(fd); 80 int fd; local 94 fd = rump_sys_open("test_fillup", O_CREAT | O_RDWR, 0644); 95 if (fd < 0) { 107 error = rump_sys_write(fd, buf, sizeof(buf)); 113 if (rump_sys_write(fd, bu 128 int fd; local 165 int fd; local 213 int fd, fssfd; local 280 int fd; local [all...] |
/freebsd-11-stable/tools/regression/poll/ |
H A D | pipepoll.c | 90 child(int fd, int num) argument 97 fd = open(FIFONAME, O_RDONLY | O_NONBLOCK); 98 if (fd < 0) 101 pfd.fd = fd; 134 if (read(fd, buf, sizeof buf) != 1) 152 * start quite from scratch since the read fd is not new. Check 188 if (read(fd, buf, sizeof buf) != 1) 201 pfd.fd = fd2; 205 pfd.fd 221 parent(int fd) argument 279 int fd[2], num; local [all...] |
/freebsd-11-stable/libexec/tftpd/tests/ |
H A D | functional.c | 360 write_all(int fd, const void *buf, size_t nbytes) argument 365 r = write(fd, buf, nbytes); 382 int fd; local 394 fd = open("abspath.txt", O_CREAT | O_RDONLY, 0644); 395 ATF_REQUIRE(fd >= 0); 396 close(fd); 425 int fd; local 428 fd = open("small.txt", O_RDWR | O_CREAT, 0644); 429 ATF_REQUIRE(fd >= 0); 430 write_all(fd, content 443 int fd; local 466 int fd; local 497 int fd; local 524 int fd; local 539 int fd; local 555 int fd; local 579 int fd; local 640 int fd; local 686 int fd; local 710 int fd; local 747 int fd; local 780 int fd; local 814 int fd; local 830 int fd; local 846 int fd; local 878 int fd; local 921 int fd; local 949 int fd; local [all...] |
/freebsd-11-stable/release/picobsd/tinyware/help/ |
H A D | help.c | 44 FILE *fd; local 47 if (!(fd=fopen("/help.a", "r"))) { 56 s=display(fd, argc>1 ? argv[1] : "help"); 59 rewind(fd); 60 s|=display(fd, argv[i++]); 66 (void)fclose(fd); 85 display(FILE *fd, const char *fname) argument 92 if (!fgets(aname, sizeof aname, fd)) { 98 if (fread((void *)&ar, sizeof ar, 1, fd)!=1) return 1; 107 if (fseek(fd, (lon [all...] |
/freebsd-11-stable/tests/sys/posixshm/ |
H A D | posixshm_test.c | 69 int fd; local 71 fd = shm_open(path, flags, mode); 72 ATF_CHECK_MSG(fd == -1, "shm_open didn't fail"); 92 * Open the test object and write '1' to the first byte. Returns valid fd 99 int fd, pagesize; local 105 fd = shm_open(test_path, O_CREAT|O_EXCL|O_RDWR, 0777); 106 if (fd < 0 && errno == EEXIST) { 109 fd = shm_open(test_path, O_CREAT | O_EXCL | O_RDWR, 0777); 111 if (fd < 0) 113 if (ftruncate(fd, pagesiz 131 int fd, pagesize; local 156 int fd, pagesize; local 185 int fd, pagesize; local 211 int fd; local 253 int fd; local 296 int fd; local 315 int fd; local 366 int fd, pagesize, status; local 615 int fd; local [all...] |
/freebsd-11-stable/contrib/ntp/lib/isc/win32/ |
H A D | keyboard.c | 39 int fd; local 43 fd = _fileno(stdin); 44 if (fd < 0) 47 keyboard->fd = fd; 61 keyboard->fd = -1; 74 cc = read(keyboard->fd, &c, 1);
|
/freebsd-11-stable/contrib/ipfilter/ipsend/ |
H A D | sockraw.c | 41 int fd; local 46 if ((fd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW)) < 0) 52 if (ioctl(fd, SIOCGIFADDR, &ifr) == -1) 61 if (bind(fd, &s, sizeof(s)) == -1) 63 return fd; 70 int sendip(int fd, char *pkt, int len) argument 82 if (sendto(fd, pkt, len, 0, &sin, sizeof(sin)) == -1)
|
/freebsd-11-stable/stand/powerpc/kboot/ |
H A D | host_syscall.h | 33 ssize_t host_read(int fd, void *buf, size_t nbyte); 34 ssize_t host_write(int fd, const void *buf, size_t nbyte); 35 ssize_t host_seek(int fd, int64_t offset, int whence); 37 ssize_t host_llseek(int fd, int32_t offset_high, int32_t offset_lo, uint64_t *result, int whence); 38 int host_close(int fd); 39 void *host_mmap(void *addr, size_t len, int prot, int flags, int fd, int); 58 int host_getdents(int fd, void *dirp, int count);
|
/freebsd-11-stable/contrib/netbsd-tests/kernel/ |
H A D | t_filedesc.c | 53 static int fd; variable 62 rump_sys_write(fd, &fd, sizeof(fd)); 83 fd = fd_wrk = rump_sys_open("/dev/null", O_RDWR, 0); 84 if (fd == -1) 96 assert(fd == fd_wrk);
|
/freebsd-11-stable/usr.sbin/mptutil/ |
H A D | mpt_config.c | 89 * leak the fd on purpose since this application is not long-running. 180 mpt_create_physdisk(int fd, struct mpt_standalone_disk *disk, U8 *PhysDiskNum) argument 187 error = mpt_read_config_page_header(fd, MPI_CONFIG_PAGETYPE_RAID_PHYSDISK, 206 error = mpt_raid_action(fd, MPI_RAID_ACTION_CREATE_PHYSDISK, 0, 0, 0, 0, 216 mpt_delete_physdisk(int fd, U8 PhysDiskNum) argument 219 return (mpt_raid_action(fd, MPI_RAID_ACTION_DELETE_PHYSDISK, 0, 0, 236 int ch, error, fd, i; local 238 fd = mpt_open(mpt_unit); 239 if (fd < 0) { 245 ioc2 = mpt_read_ioc_page(fd, 362 parse_volume(int fd, int raid_type, struct config_id_state *state, char *volume_str, struct volume_info *info) argument 443 add_drives(int fd, struct volume_info *info, int verbose) argument 505 build_volume(int fd, struct volume_info *info, int raid_type, long stripe_size, struct config_id_state *state, int verbose) argument 628 int ch, error, fd, i, quick, raid_type, verbose; local 793 int error, fd; local 837 find_volume_spare_pool(int fd, const char *name, int *pool) argument 925 int error, fd, i, nsdisks, pool; local 1023 int error, fd; local 1090 int error, fd, i, ndisks; local 1140 int error, fd; local 1222 int error, fd; local [all...] |
H A D | mpt_volume.c | 72 int error, fd; local 84 fd = mpt_open(mpt_unit); 85 if (fd < 0) { 91 error = mpt_lookup_volume(fd, av[1], &VolumeBus, &VolumeID); 97 vnames = mpt_vol_names(fd, VolumeBus, VolumeID, NULL); 101 close(fd); 108 close(fd); 117 if (mpt_write_config_page(fd, vnames, NULL) < 0) { 121 close(fd); 126 close(fd); 140 int error, fd; local 208 int error, fd; local [all...] |
/freebsd-11-stable/contrib/llvm-project/lldb/source/Utility/ |
H A D | SelectHelper.cpp | 49 void SelectHelper::FDSetRead(lldb::socket_t fd) { argument 50 m_fd_map[fd].read_set = true; 53 void SelectHelper::FDSetWrite(lldb::socket_t fd) { argument 54 m_fd_map[fd].write_set = true; 57 void SelectHelper::FDSetError(lldb::socket_t fd) { argument 58 m_fd_map[fd].error_set = true; 61 bool SelectHelper::FDIsSetRead(lldb::socket_t fd) const { 62 auto pos = m_fd_map.find(fd); 69 bool SelectHelper::FDIsSetWrite(lldb::socket_t fd) const { 70 auto pos = m_fd_map.find(fd); 109 const lldb::socket_t fd = pair.first; local 179 const lldb::socket_t fd = pair.first; local 235 const int fd = pair.first; local [all...] |
/freebsd-11-stable/usr.sbin/mfiutil/ |
H A D | mfi_drive.c | 63 int error, fd, len; local 77 fd = mfi_open(mfi_unit, O_RDWR); 78 if (fd < 0) { 84 if (mfi_pd_get_info(fd, device_id, &info, NULL) < 0) { 86 close(fd); 90 close(fd); 163 mfi_lookup_drive(int fd, char *drive, uint16_t *device_id) argument 205 if (mfi_pd_get_list(fd, &list, NULL) < 0) { 253 mfi_pd_get_list(int fd, struct mfi_pd_list **listp, uint8_t *statusp) argument 268 if (mfi_dcmd_command(fd, MFI_DCMD_PD_GET_LIS 284 mfi_pd_get_info(int fd, uint16_t device_id, struct mfi_pd_info *info, uint8_t *statusp) argument 389 int error, fd; local 498 int error, fd; local 555 int error, fd; local 611 int error, fd; local 666 int error, fd; local 726 int error, fd; local [all...] |
/freebsd-11-stable/contrib/libarchive/libarchive/ |
H A D | archive_write_open_fd.c | 54 int fd; member in struct:write_fd_data 62 archive_write_open_fd(struct archive *a, int fd) argument 71 mine->fd = fd; 73 setmode(mine->fd, O_BINARY); 87 if (fstat(mine->fd, &st) != 0) { 88 archive_set_error(a, errno, "Couldn't stat fd %d", mine->fd); 107 S_ISFIFO(st.st_mode) || (mine->fd == 1)) 125 bytesWritten = write(mine->fd, buf [all...] |
/freebsd-11-stable/usr.sbin/pciconf/ |
H A D | cap.c | 49 static void list_ecaps(int fd, struct pci_conf *p); 52 cap_power(int fd, struct pci_conf *p, uint8_t ptr) argument 56 cap = read_config(fd, &p->pc_sel, ptr + PCIR_POWER_CAP, 2); 57 status = read_config(fd, &p->pc_sel, ptr + PCIR_POWER_STATUS, 2); 66 cap_agp(int fd, struct pci_conf *p, uint8_t ptr) argument 70 status = read_config(fd, &p->pc_sel, ptr + AGP_STATUS, 4); 71 command = read_config(fd, &p->pc_sel, ptr + AGP_CAPID, 4); 120 cap_vpd(int fd __unused, struct pci_conf *p __unused, uint8_t ptr __unused) 127 cap_msi(int fd, struct pci_conf *p, uint8_t ptr) argument 132 ctrl = read_config(fd, 146 cap_pcix(int fd, struct pci_conf *p, uint8_t ptr) argument 222 cap_ht(int fd, struct pci_conf *p, uint8_t ptr) argument 301 cap_vendor(int fd, struct pci_conf *p, uint8_t ptr) argument 359 cap_debug(int fd, struct pci_conf *p, uint8_t ptr) argument 369 cap_subvendor(int fd, struct pci_conf *p, uint8_t ptr) argument 434 cap_express(int fd, struct pci_conf *p, uint8_t ptr) argument 540 cap_msix(int fd, struct pci_conf *p, uint8_t ptr) argument 574 cap_pciaf(int fd, struct pci_conf *p, uint8_t ptr) argument 645 cap_ea(int fd, struct pci_conf *p, uint8_t ptr) argument 720 list_caps(int fd, struct pci_conf *p) argument 819 ecap_aer(int fd, struct pci_conf *p, uint16_t ptr, uint8_t ver) argument 835 ecap_vc(int fd, struct pci_conf *p, uint16_t ptr, uint8_t ver) argument 851 ecap_sernum(int fd, struct pci_conf *p, uint16_t ptr, uint8_t ver) argument 864 ecap_vendor(int fd, struct pci_conf *p, uint16_t ptr, uint8_t ver) argument 876 ecap_sec_pcie(int fd, struct pci_conf *p, uint16_t ptr, uint8_t ver) argument 895 ecap_sriov(int fd, struct pci_conf *p, uint16_t ptr, uint8_t ver) argument 1000 list_ecaps(int fd, struct pci_conf *p) argument 1051 pci_find_cap(int fd, struct pci_conf *p, uint8_t id) argument 1085 pcie_find_cap(int fd, struct pci_conf *p, uint16_t id) argument [all...] |
/freebsd-11-stable/contrib/ofed/librdmacm/ |
H A D | preload.c | 90 int (*fxstat)(int ver, int fd, struct stat *buf); 120 int fd; member in struct:fd_info 285 static void fd_store(int index, int fd, enum fd_type type, enum fd_fork_state state) argument 290 fdi->fd = fd; 295 static inline enum fd_type fd_get(int index, int *fd) argument 301 *fd = fdi->fd; 305 *fd = index; 315 return fdi ? fdi->fd 334 fd_close(int index, int *fd) argument 568 int fd; local 575 int fd, ret; local 588 int fd, index, ret; local 746 fd_fork_get(int index, int *fd) argument 767 int fd, ret; local 789 int fd; local 797 int fd; local 805 int fd; local 812 int fd; local 820 int fd; local 828 int fd; local 836 int fd; local 844 int fd; local 851 int fd; local 859 int fd; local 916 int fd, events, i = 0; local 935 int fd, rfd, i, cnt = 0; local 995 int fd; local 1028 int fd; local 1036 int fd; local 1046 int fd; local 1055 int fd; local 1066 int fd, ret; local 1156 int fd; local 1175 int fd, ret; local [all...] |
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/c063/ |
H A D | t_symlinkat.c | 57 atf_tc_set_md_var(tc, "descr", "See that symlinkat works with fd"); 61 int dfd, fd; local 66 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); 67 ATF_REQUIRE(close(fd) != -1); 82 "See that symlinkat works with fd as AT_FDCWD"); 86 int fd; local 91 ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); 92 ATF_REQUIRE(close(fd) != -1); 105 "See that symlinkat works with fd as AT_FDCWD and bad path"); 109 int fd; local 131 int fd; local [all...] |
/freebsd-11-stable/contrib/ntp/lib/isc/unix/ |
H A D | keyboard.c | 39 int fd; local 45 fd = open("/dev/tty", O_RDONLY, 0); 46 if (fd < 0) 49 keyboard->fd = fd; 51 if (tcgetattr(fd, &keyboard->saved_mode) < 0) { 67 if (tcsetattr(fd, TCSAFLUSH, ¤t_mode) < 0) { 77 close (fd); 89 (void)tcsetattr(keyboard->fd, TCSAFLUSH, &keyboard->saved_mode); 90 (void)close(keyboard->fd); [all...] |
/freebsd-11-stable/contrib/ntp/libntp/ |
H A D | icom.c | 23 #define write(fd, data, octets) async_write(fd, data, octets) 64 * icom_freq(fd, ident, freq) - load radio frequency 73 int fd, /* file descriptor */ 89 rc = write(fd, cmd, temp + 7); 145 int fd; local 149 fd = tty_open(device, O_RDWR, 0777); 150 if (fd < 0) 153 rc = tcgetattr(fd, &ttyb); 156 close(fd); 72 icom_freq( int fd, int ident, double freq ) argument [all...] |
/freebsd-11-stable/contrib/ntp/sntp/libevent/ |
H A D | changelist-internal.h | 30 A "changelist" is a list of all the fd status changes that should be made 40 2) Sometimes we can coalesce multiple changes on the same fd into a single 54 /** The fd or signal whose events are to be changed */ 55 evutil_socket_t fd; member in struct:event_change 56 /* The events that were enabled on the fd before any of these changes 60 /* The changes that we want to make in reading and writing on this fd. 74 /* If set, this event refers a signal, not an fd. */ 96 int event_changelist_add_(struct event_base *base, evutil_socket_t fd, short old, short events, 99 int event_changelist_del_(struct event_base *base, evutil_socket_t fd, short old, short events,
|
/freebsd-11-stable/contrib/groff/src/libs/libbib/ |
H A D | map.c | 41 char *mapread(int fd, int nbytes) argument 44 MAP_FILE|MAP_PRIVATE, fd, (off_t)0); 70 char *mapread(int fd, int nbytes) argument
|
/freebsd-11-stable/crypto/heimdal/appl/ftp/common/ |
H A D | sockbuf.c | 45 set_buffer_size(int fd, int read) argument 56 if(getsockopt(fd, SOL_SOCKET, optname, (void *)&curr, &optlen) == 0) { 65 setsockopt(fd, SOL_SOCKET, optname, (void *)&size, sizeof(size)) < 0)
|
/freebsd-11-stable/lib/libc/posix1e/ |
H A D | mac_set.c | 38 extern int __mac_set_fd(int fd, struct mac *mac_p); 44 mac_set_fd(int fd, struct mac *label) argument 47 return (__mac_set_fd(fd, label));
|