Searched refs:tfd (Results 1 - 22 of 22) sorted by relevance

/netbsd-6-1-5-RELEASE/tests/rump/rumpvfs/
H A Dt_etfs.c66 int tfd; local
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, TESTSTR
120 int rv, tfd; local
168 int rv, tfd; local
230 int rv, tfd; local
[all...]
/netbsd-6-1-5-RELEASE/bin/ksh/
H A Dtty.c113 int tfd; local
124 if ((tfd = open(devtty, O_RDWR, 0)) < 0) {
136 tfd = open(devtty, O_RDWR, 0);
143 if (tfd < 0) {
152 tfd = -1;
155 if (tfd < 0) {
158 tfd = 0;
160 tfd = 2;
166 if ((tty_fd = ksh_dupbase(tfd, FDBASE)) < 0) {
177 close(tfd);
[all...]
/netbsd-6-1-5-RELEASE/dist/ipf/lib/
H A Dipft_hx.c28 static int tfd = -1; variable
33 if (tfp && tfd != -1) {
35 return tfd;
39 tfd = 0;
42 tfd = open(fname, O_RDONLY);
43 if (tfd != -1)
44 tfp = fdopen(tfd, "r");
46 return tfd;
52 int cfd = tfd;
54 tfd
[all...]
H A Dipft_td.c56 static int tfd = -1; variable
62 if (tfd != -1)
63 return tfd;
66 tfd = 0;
69 tfd = open(fname, O_RDONLY);
70 tfp = fdopen(tfd, "r");
72 return tfd;
79 return close(tfd);
H A Dipft_tx.c40 static int tfd = -1; variable
100 if (tfp && tfd != -1) {
102 return tfd;
106 tfd = 0;
109 tfd = open(fname, O_RDONLY);
110 if (tfd != -1)
111 tfp = fdopen(tfd, "r");
113 return tfd;
119 int cfd = tfd;
121 tfd
[all...]
/netbsd-6-1-5-RELEASE/lib/libutil/compat/
H A Dcompat_passwd.c76 pw_copy(int ffd, int tfd, struct passwd50 *pw50, struct passwd50 *opw50) argument
82 __pw_copy50(ffd, tfd, &pw, opw50 ? &opw : NULL);
86 pw_copyx(int ffd, int tfd, struct passwd50 *pw50, struct passwd50 *opw50, argument
93 return __pw_copyx50(ffd, tfd, &pw, opw50 ? &opw : NULL, errbuf,
/netbsd-6-1-5-RELEASE/usr.sbin/vipw/
H A Dvipw.c69 int pfd, tfd; local
97 tfd = pw_lock(0);
98 if (tfd < 0) {
108 copyfile(pfd, tfd);
109 (void)close(tfd);
/netbsd-6-1-5-RELEASE/usr.bin/chpass/
H A Dchpass.c85 int ch, dfd, pfd, tfd; local
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);
/netbsd-6-1-5-RELEASE/external/gpl3/gcc/dist/gcc/testsuite/gcc.c-torture/compile/
H A Dpr37381.c39 int tfd; variable
55 (tfd,
76 (tfd,
/netbsd-6-1-5-RELEASE/usr.bin/passwd/
H A Dlocal_passwd.c137 int pfd, tfd; local
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);
274 int pfd, tfd; local
315 tfd = pw_lock(0);
316 if (tfd < 0) {
318 tfd
[all...]
/netbsd-6-1-5-RELEASE/usr.sbin/rpc.yppasswdd/
H A Dyppasswdd_mkpw.c68 int pfd, tfd; local
129 tfd = pw_lock(0);
130 if (tfd < 0) {
155 pw_copy(pfd, tfd, &pw, NULL);
/netbsd-6-1-5-RELEASE/external/bsd/file/dist/src/
H A Dcompress.c249 int tfd; local
258 tfd = open(ptr, O_RDWR|O_TRUNC|O_EXCL|O_CREAT, 0600);
264 tfd = mkstemp(buf);
269 if (tfd == -1) {
275 if (swrite(tfd, startbuf, nbytes) != (ssize_t)nbytes)
279 if (swrite(tfd, buf, (size_t)r) != r)
299 if ((fd = dup2(tfd, fd)) == -1) {
303 (void)close(tfd);
/netbsd-6-1-5-RELEASE/usr.sbin/lpr/lpr/
H A Dlpr.c97 static int tfd; /* control file descriptor */ variable
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, bu
[all...]
/netbsd-6-1-5-RELEASE/lib/libpam/modules/pam_unix/
H A Dpam_unix.c360 int tfd, pfd; local
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) {
/netbsd-6-1-5-RELEASE/dist/ipf/ipsend/
H A Dsock.c290 struct tcpcb *find_tcp(tfd, ti)
291 int tfd;
348 if (KMCPY(f, o[tfd], sizeof(*f)) == -1)
350 fprintf(stderr, "read(%#lx,%#lx,%lu) - o[tfd] - failed\n",
351 (u_long)o[tfd], (u_long)f, (u_long)sizeof(*f));
/netbsd-6-1-5-RELEASE/external/cddl/osnet/dist/tools/ctf/cvt/
H A Doutput.c741 int tfd = -1; local
749 if ((tfd = open(newname, O_RDWR | O_CREAT | O_TRUNC, st.st_mode)) < 0)
751 if ((telf = elf_begin(tfd, ELF_C_WRITE, NULL)) == NULL)
761 (void) close(tfd);
/netbsd-6-1-5-RELEASE/lib/libutil/
H A Dpasswd.c342 pw_copy(int ffd, int tfd, struct passwd *pw, struct passwd *old_pw) argument
347 rv = pw_copyx(ffd, tfd, pw, old_pw, errbuf, sizeof(errbuf));
365 pw_copyx(int ffd, int tfd, struct passwd *pw, struct passwd *old_pw, argument
394 if (!(to = fdopen(tfd, "w"))) {
/netbsd-6-1-5-RELEASE/sys/dev/pci/
H A Dif_ste.c585 struct ste_tfd *tfd; local
617 tfd = &sc->sc_txdescs[nexttx];
672 tfd->tfd_frags[seg].frag_addr =
674 tfd->tfd_frags[seg].frag_len =
678 tfd->tfd_frags[seg - 1].frag_len |= htole32(FRAG_LAST);
681 tfd->tfd_next = htole32(STE_CDTXADDR(sc, nexttx));
682 tfd->tfd_control = htole32(TFD_FrameId(nexttx) | (totlen & 3));
H A Dif_stge.c788 struct stge_tfd *tfd; local
837 tfd = &sc->sc_txdescs[nexttx];
879 tfd->tfd_frags[seg].frag_word0 =
949 tfd->tfd_control = htole64(tfc);
/netbsd-6-1-5-RELEASE/sys/dev/ic/
H A Dahcisata_core.c511 uint32_t is, tfd; local
535 tfd = AHCI_READ(sc, AHCI_P_TFD(chp->ch_channel));
537 (tfd & AHCI_P_TFD_ERR_MASK) >> AHCI_P_TFD_ERR_SHIFT;
538 chp->ch_status = (tfd & 0xff);
577 int i, tfd; local
596 tfd = AHCI_READ(sc, AHCI_P_TFD(chp->ch_channel));
597 if ((((tfd & AHCI_P_TFD_ST) >> AHCI_P_TFD_ST_SHIFT)
604 AHCINAME(sc), tfd);
/netbsd-6-1-5-RELEASE/usr.sbin/pwd_mkdb/
H A Dpwd_mkdb.c258 int ch, makeold, tfd, lineno, found, rv, hasyp, secureonly; local
402 if ((tfd = open(oldpwdfile, O_WRONLY | O_CREAT | O_EXCL,
406 if ((oldfp = fdopen(tfd, "w")) == NULL)
/netbsd-6-1-5-RELEASE/usr.bin/make/
H A Djob.c1513 int tfd; /* File descriptor to the temp file */ local
1576 tfd = mkTempFile(TMPPAT, &tfile);
1581 job->cmdFILE = fdopen(tfd, "w+");

Completed in 417 milliseconds