| /src/bin/ksh/ | 
| tty.c | 103 	int	tfd;  local in function:tty_init 112 	if ((tfd = open(devtty, O_RDWR, 0)) < 0) {
 113 		if (tfd < 0) {
 121 	if (tfd < 0) {
 124 			tfd = 0;
 126 			tfd = 2;
 132 	if ((tty_fd = ksh_dupbase(tfd, FDBASE)) < 0) {
 143 		close(tfd);
 
 | 
| /src/usr.sbin/rpc.yppasswdd/ | 
| yppasswdd_mkpw.c | 68 	int pfd, tfd;  local in function:make_passwd 129 	tfd = pw_lock(0);
 130 	if (tfd < 0) {
 155 	pw_copy(pfd, tfd, &pw, NULL);
 
 | 
| /src/usr.sbin/vipw/ | 
| vipw.c | 69 	int pfd, tfd;  local in function:main 97 	tfd = pw_lock(0);
 98 	if (tfd < 0) {
 108 	copyfile(pfd, tfd);
 109 	(void)close(tfd);
 
 | 
| /src/tests/rump/rumpvfs/ | 
| t_etfs.c | 66 	int tfd;  local in function:ATF_TC_BODY 81 	tfd = rump_sys_open(TESTPATH1, O_RDONLY);
 82 	ATF_REQUIRE(tfd != -1);
 83 	ATF_REQUIRE(rump_sys_read(tfd, buf, sizeof(buf)) > 0);
 84 	rump_sys_close(tfd);
 89 	tfd = rump_sys_open(TESTPATH2, O_RDWR);
 90 	ATF_REQUIRE(tfd != -1);
 92 	ATF_REQUIRE((n = rump_sys_read(tfd, buf, sizeof(buf))) > 0);
 98 	ATF_REQUIRE_EQ(rump_sys_lseek(tfd, 0, SEEK_SET), 0);
 100 	ATF_REQUIRE_EQ(rump_sys_write(tfd, TESTSTR2, TESTSTR2SZ), TESTSTR2SZ)
 122  int rv, tfd;  local in function:ATF_TC_BODY
 170  int rv, tfd;  local in function:ATF_TC_BODY
 237  int rv, tfd;  local in function:ATF_TC_BODY
 [all...]
 | 
| /src/usr.bin/chpass/ | 
| chpass.c | 85 	int ch, dfd, pfd, tfd;  local in function:main 260 	tfd = pw_lock(0);
 261 	if (tfd < 0) {
 265 		tfd = pw_lock(10);
 266 		if (tfd < 0) {
 273 	if (fcntl(tfd, F_SETFD, 1) < 0)
 281 	pw_copy(pfd, tfd, pw, (op == LOADENTRY) ? NULL : &old_pw);
 284 	close(tfd);
 
 | 
| /src/usr.bin/passwd/ | 
| local_passwd.c | 137 	int pfd, tfd;  local in function:pwlocal_process 204 	tfd = pw_lock(0);
 205 	if (tfd < 0) {
 207 		tfd = pw_lock(10);
 208 		if (tfd < 0)
 217 	pw_copy(pfd, tfd, pw, &old_pw);
 272 	int pfd, tfd;  local in function:local_chpw
 313 	tfd = pw_lock(0);
 314 	if (tfd < 0) {
 316 		tfd = pw_lock(10)
 [all...]
 | 
| /src/tests/lib/libc/sys/ | 
| t_timerfd.c | 768 	int tfd;  local in function:ATF_TC_BODY 771 	ATF_REQUIRE((tfd = timerfd_create(CLOCK_MONOTONIC, 0)) >= 0);
 772 	ATF_REQUIRE((fcntl(tfd, F_GETFL) & O_NONBLOCK) == 0);
 773 	ATF_REQUIRE(fcntl(tfd, F_SETFL, O_NONBLOCK) == 0);
 774 	ATF_REQUIRE((fcntl(tfd, F_GETFL) & O_NONBLOCK) != 0);
 775 	ATF_REQUIRE((fcntl(tfd, F_GETFD) & FD_CLOEXEC) == 0);
 778 	ATF_REQUIRE(ioctl(tfd, FIONREAD, &val) == 0);
 781 	ATF_REQUIRE_ERRNO(ENOTTY, ioctl(tfd, FIONWRITE, &val) == -1);
 782 	ATF_REQUIRE_ERRNO(ENOTTY, ioctl(tfd, FIONSPACE, &val) == -1);
 783 	(void)close(tfd);
 [all...]
 | 
| /src/sys/dev/ata/ | 
| ata_wdc.c | 183 	int wait_flags, tfd;  local in function:wdc_ata_bio_start 224 		    &tfd))
 231 		    &tfd))
 233 		if (ATACH_ST(tfd) & (WDCS_ERR | WDCS_DWF))
 245 		    &tfd))
 247 		if (ATACH_ST(tfd) & (WDCS_ERR | WDCS_DWF))
 264 		    &tfd))
 266 		if (ATACH_ST(tfd) & (WDCS_ERR | WDCS_DWF))
 279 		    &tfd))
 281 		if (ATACH_ST(tfd) & (WDCS_ERR | WDCS_DWF)
 344  int nblks, tfd;  local in function:_wdc_ata_bio_start
 634  int drv_err, tfd;  local in function:wdc_ata_bio_intr
 [all...]
 | 
| ata.c | 1592 			uint32_t tfd = (uint32_t)arg;  local in function:ata_thread_run 1595 			chp->recovery_tfd = tfd;
 1651 		uint32_t tfd = (uint32_t)arg;  local in function:ata_thread_run
 1657 		(*atac->atac_bustype_ata->ata_recovery)(chp, flags, tfd);
 
 | 
| /src/lib/libpam/modules/pam_unix/ | 
| pam_unix.c | 360 	int tfd, pfd;  local in function:local_set_password 363 	tfd = pw_lock(0);
 364 	if (tfd < 0) {
 366 		tfd = pw_lock(10);
 367 		if (tfd < 0) {
 381 	if (pw_copyx(pfd, tfd, pwd, opwd, errbuf, sizeof(errbuf)) == 0) {
 
 | 
| /src/usr.sbin/lpr/lpr/ | 
| lpr.c | 97 static int	 tfd;		/* control file descriptor */  variable in typeref:typename:int 304 	tfd = nfile(tfname);
 306 	(void)fchown(tfd, DU, -1);	/* owned by daemon for protection */
 385 		(void)close(tfd);
 391 		if ((tfd = open(tfname, O_RDWR)) >= 0) {
 394 			if (read(tfd, &ch, 1) == 1 &&
 395 			    lseek(tfd, (off_t)0, 0) == 0 &&
 396 			    write(tfd, &ch, 1) != 1) {
 401 			(void)close(tfd);
 527 	if (write(tfd, buf, len) != (ssize_t)len
 [all...]
 | 
| /src/sys/kern/ | 
| sys_timerfd.c | 91 timerfd_fire_count(const struct timerfd * const tfd) 93 	return (unsigned int)tfd->tfd_itimer.it_overruns;
 97 timerfd_is_readable(const struct timerfd * const tfd)
 99 	return tfd->tfd_itimer.it_overruns != 0 || tfd->tfd_cancelled;
 112 	struct timerfd * const tfd =  local in function:timerfd_fire
 116 	timerfd_wake(tfd);
 130 	struct timerfd * const tfd =  local in function:timerfd_realtime_changed
 136 	if (tfd->tfd_cancel_on_set) {
 137 		tfd->tfd_cancelled = true
 159  struct timerfd * const tfd = kmem_zalloc(sizeof(*tfd), KM_SLEEP);  local in function:timerfd_create
 266  struct timerfd * const tfd = fp->f_timerfd;  local in function:timerfd_fop_read
 305  struct timerfd * const tfd = fp->f_timerfd;  local in function:timerfd_fop_ioctl
 339  struct timerfd * const tfd = fp->f_timerfd;  local in function:timerfd_fop_poll
 358  struct timerfd * const tfd = fp->f_timerfd;  local in function:timerfd_fop_stat
 382  struct timerfd * const tfd = fp->f_timerfd;  local in function:timerfd_fop_close
 393  struct timerfd * const tfd = ((file_t *)kn->kn_obj)->f_timerfd;  local in function:timerfd_filt_read_detach
 404  struct timerfd * const tfd = ((file_t *)kn->kn_obj)->f_timerfd;  local in function:timerfd_filt_read
 432  struct timerfd * const tfd = ((file_t *)kn->kn_obj)->f_timerfd;  local in function:timerfd_fop_kqfilter
 457  struct timerfd * const tfd = fp->f_timerfd;  local in function:timerfd_fop_restart
 560  struct timerfd * const tfd = fp->f_timerfd;  local in function:do_timerfd_gettime
 617  struct timerfd * const tfd = fp->f_timerfd;  local in function:do_timerfd_settime
 [all...]
 | 
| /src/sys/dev/scsipi/ | 
| atapi_wdc.c | 486 	int tfd;  local in function:wdc_atapi_start 522 		if (wdc_wait_for_unbusy(chp, ATAPI_DELAY, wait_flags, &tfd))
 528 		    &tfd))
 530 		if (ATACH_ST(tfd) & WDCS_ERR) {
 531 			if (ATACH_ST(tfd) == WDCE_ABRT) {
 562 		    &tfd))
 564 		if (ATACH_ST(tfd) & WDCS_ERR) {
 565 			if (ATACH_ERR(tfd) == WDCE_ABRT) {
 603 	switch (wdc_wait_for_unbusy(chp, ATAPI_DELAY, wait_flags, &tfd)) {
 608 		    ATACH_ST(tfd));
 740  int ire, tfd;  local in function:wdc_atapi_intr
 1175  int tfd;  local in function:wdc_atapi_reset
 [all...]
 | 
| /src/bin/sh/ | 
| show.c | 78 	int	tfd;	/* file descriptor for open trace file */  member in struct:traceinfo 165 		(void) fclose(tracefile);	/* also closes tfd */
 173 	if (tracedata.tfd > 0 && tracedata.tfd != fd)
 174 		(void) close(tracedata.tfd);	/* usually done by fclose() */
 176 	tracedata.tfd = fd;
 890 	written = writev(fp->tfd, fp->lines, niov);
 1042 	tracetfile->tfd = to;
 
 | 
| /src/sys/dev/ic/ | 
| wdc.c | 300 	int i, j, error, tfd;  local in function:wdc_drvprobe 451 			if (wdc_wait_for_ready(chp, 10000, 0, &tfd) ==
 463 			if (wdc_wait_for_ready(chp, 10000, 0, &tfd) ==
 1205 __wdcwait(struct ata_channel *chp, int mask, int bits, int timeout, int *tfd)
 1216 	*tfd = 0;
 1264 	*tfd = ATACH_ERR_ST(error, status);
 1274     int *tfd)
 1282 		error = __wdcwait(chp, mask, bits, timeout, tfd);
 1284 		error = __wdcwait(chp, mask, bits, WDCDELAY_POLL, tfd);
 1293 					    WDCDELAY_POLL, tfd) == 0)
 1434  int tfd;  local in function:__wdccommand_start
 1505  int wflags, tfd;  local in function:__wdccommand_intr
 [all...]
 | 
| siisata.c | 514 	uint32_t pss, pis, tfd = 0;  local in function:siisata_intr_port 540 		tfd = ATACH_ERR_ST(WDCE_CRC, WDCS_ERR);
 557 					tfd = ntfd;
 594 		xfer->ops->c_intr(chp, xfer, tfd);
 619 		ata_thread_run(chp, 0, ATACH_TH_RECOVERY, tfd);
 626 siisata_channel_recover(struct ata_channel *chp, int flags, uint32_t tfd)
 649 	if ((ATACH_ST(tfd) & (WDCS_BSY|WDCS_DRQ)) != 0) {
 657 	ata_recovery_resume(chp, drive, tfd, flags);
 1079 siisata_cmd_complete(struct ata_channel *chp, struct ata_xfer *xfer, int tfd)
 1099 	if (ATACH_ST(tfd) & WDCS_BSY)
 [all...]
 | 
| ahcisata_core.c | 648 	uint32_t is, tfd, sact;  local in function:ahci_intr_port_common 658 	    "is 0x%x CI 0x%x SACT 0x%x TFD 0x%x\n",
 679 			tfd = AHCI_READ(sc, AHCI_P_TFD(chp->ch_channel));
 690 			    "%s port %d: TFE: sact 0x%x is 0x%x tfd 0x%x\n",
 691 			    AHCINAME(sc), chp->ch_channel, sact, is, tfd),
 695 			tfd = (WDCE_ABRT << AHCI_P_TFD_ERR_SHIFT) |
 709 		tfd = AHCI_READ(sc, AHCI_P_TFD(chp->ch_channel));
 712 		if ((tfd & WDCS_ERR) != 0) {
 717 			    AHCINAME(sc), chp->ch_channel, tfd), DEBUG_INTR);
 720 		tfd = 0
 997  int i, tfd;  local in function:ahci_reset_channel
 [all...]
 | 
| mvsata.c | 560 mvsata_channel_recover(struct ata_channel *chp, int flags, uint32_t tfd) 582 	ata_recovery_resume(chp, drive, tfd, AT_POLL);
 1026 	int nblks, error, tfd;  local in function:mvsata_bio_start
 1175 		switch(wdc_wait_for_ready(chp, ATA_DELAY, wait_flags, &tfd)) {
 1205 		if (wdc_wait_for_drq(chp, ATA_DELAY, AT_POLL, &tfd) != 0) {
 1209 			    chp->ch_channel, xfer->c_drive, ATACH_ST(tfd),
 1210 			    ATACH_ERR(tfd));
 1214 		if (ATACH_ST(tfd) & WDCS_ERR) {
 1216 			ata_bio->r_error = ATACH_ERR(tfd);
 1243 	    chp->ch_channel, xfer->c_drive, ATACH_ST(tfd), ATACH_ERR(tfd))
 1275  int tfd = 0;  local in function:mvsata_bio_intr
 1489  int tfd;  local in function:mvsata_bio_ready
 1633  int tfd;  local in function:mvsata_wdc_cmd_start
 1707  int tfd;  local in function:mvsata_wdc_cmd_intr
 2013  int tfd;  local in function:mvsata_atapi_start
 2211  int tfd;  local in function:mvsata_atapi_intr
 2475  int tfd;  local in function:mvsata_atapi_reset
 [all...]
 | 
| /src/usr.sbin/pwd_mkdb/ | 
| pwd_mkdb.c | 256 	int ch, makeold, tfd, lineno, found, rv, hasyp, secureonly;  local in function:main 400 		if ((tfd = open(oldpwdfile, O_WRONLY | O_CREAT | O_EXCL,
 404 		if ((oldfp = fdopen(tfd, "w")) == NULL)
 
 | 
| /src/sys/dev/pci/ | 
| if_ste.c | 654 	struct ste_tfd *tfd;  local in function:ste_start 686 		tfd = &sc->sc_txdescs[nexttx];
 745 			tfd->tfd_frags[seg].frag_addr =
 747 			tfd->tfd_frags[seg].frag_len =
 751 		tfd->tfd_frags[seg - 1].frag_len |= htole32(FRAG_LAST);
 754 		tfd->tfd_next = htole32(STE_CDTXADDR(sc, nexttx));
 755 		tfd->tfd_control = htole32(TFD_FrameId(nexttx) | (totlen & 3));
 
 | 
| if_stge.c | 811 	struct stge_tfd *tfd;  local in function:stge_start 863 		tfd = &sc->sc_txdescs[nexttx];
 905 			tfd->tfd_frags[seg].frag_word0 =
 975 		tfd->tfd_control = htole64(tfc);
 
 |