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

12

/freebsd-12-stable/contrib/netbsd-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
122 int rv, tfd; local
170 int rv, tfd; local
232 int rv, tfd; local
[all...]
/freebsd-12-stable/contrib/mandoc/
H A Dtag.h23 int tfd; member in struct:tag_files
H A Dtag.c62 tag_files.tfd = -1;
101 if ((tag_files.tfd = mkstemp(tag_files.tfn)) == -1) {
126 if (tag_files.tfd != -1)
127 close(tag_files.tfd);
131 tag_files.tfd = -1;
147 if (tag_files.tfd <= 0)
230 if (tag_files.tfd <= 0)
237 if ((stream = fdopen(tag_files.tfd, "w")) == NULL)
257 close(tag_files.tfd);
258 tag_files.tfd
[all...]
/freebsd-12-stable/usr.sbin/pw/
H A Dgrupd.c56 int pfd, tfd; local
73 if ((tfd = gr_tmp(-1)) == -1) {
77 if (gr_copy(pfd, tfd, gr, old_gr) == -1) {
79 close(tfd);
82 fsync(tfd);
83 close(tfd);
H A Dpw_nis.c46 int pfd, tfd; local
63 if ((tfd = pw_tmp(-1)) == -1) {
67 if (pw_copy(pfd, tfd, pw, old_pw) == -1) {
69 close(tfd);
72 fsync(tfd);
73 close(tfd);
H A Dpwupd.c93 int rc, pfd, tfd; local
110 if ((tfd = pw_tmp(-1)) == -1) {
114 if (pw_copy(pfd, tfd, pw, old_pw) == -1) {
116 close(tfd);
119 fsync(tfd);
120 close(tfd);
/freebsd-12-stable/contrib/ipfilter/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_tx.c34 static int tfd = -1; variable
90 if (tfp && tfd != -1) {
92 return tfd;
96 tfd = 0;
99 tfd = open(fname, O_RDONLY);
100 if (tfd != -1)
101 tfp = fdopen(tfd, "r");
103 return tfd;
109 int cfd = tfd;
111 tfd
[all...]
/freebsd-12-stable/usr.bin/setchannel/
H A Dsetchannel.c94 int tfd; local
214 tfd = open(dev_name, O_RDONLY);
215 if (tfd < 0) {
222 if (ioctl(tfd, TVTUNER_SETAFC, &afc) < 0) {
223 perror("ioctl(tfd, TVTUNER_SETAFC) failed.");
228 if (ioctl(tfd, METEORSINPUT, &device) < 0) {
229 perror("ioctl(tfd, METEORSINPUT) failed.");
234 if (ioctl(tfd, BT848_SAUDIO, &audio) < 0) {
235 perror("ioctl(tfd, BT848_SAUDIO) failed.");
239 if (ioctl(tfd, BT848_GAUDI
[all...]
/freebsd-12-stable/sys/compat/linux/
H A Dlinux_event.c994 struct timerfd *tfd; local
1017 tfd = malloc(sizeof(*tfd), M_EPOLL, M_WAITOK | M_ZERO);
1018 tfd->tfd_clockid = clockid;
1019 mtx_init(&tfd->tfd_lock, "timerfd", NULL, MTX_DEF);
1021 callout_init_mtx(&tfd->tfd_callout, &tfd->tfd_lock, 0);
1022 knlist_init_mtx(&tfd->tfd_sel.si_note, &tfd->tfd_lock);
1028 finit(fp, fflags, DTYPE_LINUXTFD, tfd,
1038 struct timerfd *tfd; local
1065 struct timerfd *tfd; local
1108 struct timerfd *tfd; local
1129 struct timerfd *tfd; local
1149 struct timerfd *tfd = kn->kn_hook; local
1160 struct timerfd *tfd = kn->kn_hook; local
1184 linux_timerfd_clocktime(struct timerfd *tfd, struct timespec *ts) argument
1194 linux_timerfd_curval(struct timerfd *tfd, struct itimerspec *ots) argument
1216 struct timerfd *tfd; local
1248 struct timerfd *tfd; local
1315 struct timerfd *tfd; local
[all...]
/freebsd-12-stable/usr.sbin/vipw/
H A Dvipw.c71 int ch, pfd, tfd; local
97 if ((tfd = pw_tmp(pfd)) == -1) {
101 (void)close(tfd);
/freebsd-12-stable/contrib/libbegemot/
H A Drpoll.c189 static int * tfd; /* sorted entries */ variable
432 if(tfd[i] == handle) {
433 tfd[i] = -1;
454 * Reconstruct the tfd-array. This will be an sorted array of indexes
467 tfd = _xrealloc(tfd, sizeof(int *) * tfd_alloc);
470 pp = tfd;
475 assert(pp - tfd == (ptrdiff_t)tims_used);
479 qsort(tfd, tfd_used, sizeof(int), tim_cmp);
524 i, tfd[
[all...]
/freebsd-12-stable/usr.sbin/bhyve/
H A Dmevent.c235 mevent_add_state(int tfd, enum ev_type type, argument
241 if (tfd < 0 || func == NULL) {
253 if (type != EVF_TIMER && lp->me_fd == tfd &&
260 if (type != EVF_TIMER && lp->me_fd == tfd &&
275 mevp->me_msecs = tfd;
278 mevp->me_fd = tfd;
295 mevent_add(int tfd, enum ev_type type, argument
299 return (mevent_add_state(tfd, type, func, param, EV_ADD));
303 mevent_add_disabled(int tfd, enum ev_type type, argument
307 return (mevent_add_state(tfd, typ
[all...]
H A Dpci_ahci.c162 uint32_t tfd; member in struct:ahci_port
371 ahci_write_fis_sdb(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t tfd) argument
376 error = (tfd >> 8) & 0xff;
377 tfd &= 0x77;
381 fis[2] = tfd;
385 p->err_cfis[2] = tfd;
392 p->tfd &= ~0x77;
393 p->tfd |= tfd;
398 ahci_write_fis_d2h(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t tfd) argument
1140 uint32_t tfd; local
1217 uint32_t tfd; local
1364 uint32_t tfd; local
1466 uint32_t tfd; local
1490 uint32_t tfd; local
1566 uint32_t tfd; local
1892 uint32_t tfd; local
1967 uint32_t tfd; local
[all...]
/freebsd-12-stable/lib/libutil/
H A Dgr_util.c133 int tfd; local
146 if ((tfd = mkostemp(tempname, 0)) == -1)
150 if (write(tfd, buf, (size_t)nr) != nr)
155 close(tfd);
159 return (tfd);
167 gr_copy(int ffd, int tfd, const struct group *gr, struct group *old_gr) argument
248 if (write(tfd, p, q -p + 1) != q - p + 1)
270 if (write(tfd, p, q - p + 1) != q - p + 1)
286 if (write(tfd, line, len) != (int) len)
294 if (write(tfd,
[all...]
H A Dpw_util.c213 int tfd; local
226 if ((tfd = mkostemp(tempname, 0)) == -1)
230 if (write(tfd, buf, (size_t)nr) != nr)
235 close(tfd);
239 return (tfd);
429 pw_copy(int ffd, int tfd, const struct passwd *pw, struct passwd *old_pw) argument
510 if (write(tfd, p, q - p + 1) != q - p + 1)
533 if (write(tfd, p, q - p + 1) != q - p + 1)
549 if (write(tfd, line, len) != (int)len)
557 if (write(tfd,
[all...]
/freebsd-12-stable/release/picobsd/tinyware/passwd/
H A Dlocal_passwd.c78 pw_copy(int ffd, int tfd, struct passwd *pw, struct passwd *old_pw);
204 int pfd, tfd; local
230 tfd = pw_tmp();
231 pw_copy(pfd, tfd, pw, NULL);
H A Dpw_copy.c86 pw_copy(int ffd, int tfd, struct passwd *pw, struct passwd *old_pw) argument
103 if (!(to = fdopen(tfd, "w")))
/freebsd-12-stable/usr.bin/chpass/
H A Dchpass.c85 int ch, pfd, tfd; local
213 if ((tfd = pw_tmp(-1)) == -1) {
267 if ((tfd = pw_tmp(-1)) == -1) {
271 if (pw_copy(pfd, tfd, pw, old_pw) == -1) {
/freebsd-12-stable/usr.sbin/lpr/lpr/
H A Dlpr.c105 static int tfd; /* control file descriptor */ variable
330 tfd = nfile(tfname);
332 (void) fchown(tfd, pp->daemon_user, -1);
498 (void) close(tfd);
504 if ((tfd = open(tfname, O_RDWR)) >= 0) {
507 if (read(tfd, &touch_c, 1) == 1 &&
508 lseek(tfd, (off_t)0, 0) == 0 &&
509 write(tfd, &touch_c, 1) != 1) {
515 (void) close(tfd);
631 write(tfd, bu
[all...]
/freebsd-12-stable/contrib/ipfilter/ipsend/
H A Dsock.c154 struct tcpcb *find_tcp(tfd, ti)
155 int tfd;
203 if (KMCPY(f, o[tfd], sizeof(*f)) == -1)
205 fprintf(stderr, "read(%#lx,%#lx,%lu) - o[tfd] - failed\n",
206 (u_long)o[tfd], (u_long)f, (u_long)sizeof(*f));
/freebsd-12-stable/sys/fs/tmpfs/
H A Dtmpfs_vfsops.c564 struct tmpfs_fid_data tfd; local
569 if (fhp->fid_len != sizeof(tfd))
576 memcpy(&tfd, fhp->fid_data, fhp->fid_len);
580 if (tfd.tfd_id >= tmp->tm_nodes_max)
585 if (node->tn_id == tfd.tfd_id &&
586 node->tn_gen == tfd.tfd_gen) {
/freebsd-12-stable/usr.sbin/rpc.yppasswdd/
H A Dyppasswdd_server.c478 int pfd, tfd; local
638 if ((tfd = pw_tmp(-1)) == -1) {
643 if (pw_copy(pfd, tfd, &yp_password, NULL) == -1) {
744 int pfd, tfd; local
866 if ((tfd = pw_tmp(-1)) == -1) {
872 if (pw_copy(pfd, tfd, &newpasswd, NULL) == -1) {
/freebsd-12-stable/lib/libpam/modules/pam_unix/
H A Dpam_unix.c285 int pfd, tfd, retval; local
411 else if ((tfd = pw_tmp(-1)) == -1)
413 else if (pw_copy(pfd, tfd, pwd, old_pwd) == -1)
/freebsd-12-stable/contrib/file/src/
H A Dcompress.c450 int tfd; local
456 tfd = open(ptr, O_RDWR|O_TRUNC|O_EXCL|O_CREAT, 0600);
465 tfd = mkstemp(buf);
472 if (tfd == -1) {
478 if (swrite(tfd, startbuf, nbytes) != CAST(ssize_t, nbytes))
482 if (swrite(tfd, buf, CAST(size_t, r)) != r)
502 if ((fd = dup2(tfd, fd)) == -1) {
506 (void)close(tfd);

Completed in 160 milliseconds

12