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

12

/freebsd-10.1-release/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-10.1-release/usr.bin/setchannel/
H A Dsetchannel.c92 int tfd; local
212 tfd = open(dev_name, O_RDONLY);
213 if (tfd < 0) {
220 if (ioctl(tfd, TVTUNER_SETAFC, &afc) < 0) {
221 perror("ioctl(tfd, TVTUNER_SETAFC) failed.");
226 if (ioctl(tfd, METEORSINPUT, &device) < 0) {
227 perror("ioctl(tfd, METEORSINPUT) failed.");
232 if (ioctl(tfd, BT848_SAUDIO, &audio) < 0) {
233 perror("ioctl(tfd, BT848_SAUDIO) failed.");
237 if (ioctl(tfd, BT848_GAUDI
[all...]
/freebsd-10.1-release/usr.sbin/pw/
H A Dgrupd.c73 int pfd, tfd; local
90 if ((tfd = gr_tmp(-1)) == -1) {
94 if (gr_copy(pfd, tfd, gr, old_gr) == -1) {
H A Dpw_nis.c45 int pfd, tfd; local
61 if ((tfd = pw_tmp(-1)) == -1) {
65 if (pw_copy(pfd, tfd, pw, old_pw) == -1) {
H A Dpwupd.c114 int pfd, tfd; local
130 if ((tfd = pw_tmp(-1)) == -1) {
134 if (pw_copy(pfd, tfd, pw, old_pw) == -1) {
/freebsd-10.1-release/usr.sbin/vipw/
H A Dvipw.c69 int ch, pfd, tfd; local
95 if ((tfd = pw_tmp(pfd)) == -1) {
99 (void)close(tfd);
/freebsd-10.1-release/contrib/libbegemot/
H A Drpoll.c200 static int * tfd; /* sorted entries */ variable
443 if(tfd[i] == handle) {
444 tfd[i] = -1;
465 * Reconstruct the tfd-array. This will be an sorted array of indexes
478 tfd = _xrealloc(tfd, sizeof(int *) * tfd_alloc);
481 pp = tfd;
486 assert(pp - tfd == (ptrdiff_t)tims_used);
490 qsort(tfd, tfd_used, sizeof(int), tim_cmp);
535 i, tfd[
[all...]
/freebsd-10.1-release/usr.sbin/bhyve/
H A Dpci_ahci.c147 uint32_t tfd; member in struct:ahci_port
299 ahci_write_fis_sdb(struct ahci_port *p, int slot, uint32_t tfd) argument
304 error = (tfd >> 8) & 0xff;
307 fis[2] = tfd & 0x77;
311 p->tfd = tfd;
316 ahci_write_fis_d2h(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t tfd) argument
321 error = (tfd >> 8) & 0xff;
325 fis[2] = tfd & 0xff;
341 p->tfd
767 uint32_t tfd; local
915 uint32_t tfd; local
1021 uint32_t tfd; local
1045 uint32_t tfd; local
1121 uint32_t tfd; local
1396 uint32_t tfd; local
1465 uint32_t tfd; local
[all...]
H A Dmevent.c243 mevent_add(int tfd, enum ev_type type, argument
248 if (tfd < 0 || func == NULL) {
260 if (type != EVF_TIMER && lp->me_fd == tfd &&
267 if (type != EVF_TIMER && lp->me_fd == tfd &&
282 mevp->me_msecs = tfd;
285 mevp->me_fd = tfd;
/freebsd-10.1-release/lib/libutil/
H A Dgr_util.c131 int tfd; local
144 if ((tfd = mkstemp(tempname)) == -1)
148 if (write(tfd, buf, (size_t)nr) != nr)
153 close(tfd);
157 return (tfd);
165 gr_copy(int ffd, int tfd, const struct group *gr, struct group *old_gr) argument
228 if (write(tfd, p, q -p + 1) != q - p + 1)
250 if (write(tfd, p, q - p + 1) != q - p + 1)
266 if (write(tfd, line, len) != (int) len)
274 if (write(tfd,
[all...]
H A Dpw_util.c216 int tfd; local
229 if ((tfd = mkstemp(tempname)) == -1)
233 if (write(tfd, buf, (size_t)nr) != nr)
238 close(tfd);
242 return (tfd);
429 pw_copy(int ffd, int tfd, const struct passwd *pw, struct passwd *old_pw) argument
499 if (write(tfd, p, q - p + 1) != q - p + 1)
522 if (write(tfd, p, q - p + 1) != q - p + 1)
538 if (write(tfd, line, len) != (int)len)
546 if (write(tfd,
[all...]
/freebsd-10.1-release/release/picobsd/tinyware/passwd/
H A Dlocal_passwd.c76 pw_copy(int ffd, int tfd, struct passwd *pw, struct passwd *old_pw);
202 int pfd, tfd; local
228 tfd = pw_tmp();
229 pw_copy(pfd, tfd, pw, NULL);
H A Dpw_copy.c84 pw_copy(int ffd, int tfd, struct passwd *pw, struct passwd *old_pw) argument
101 if (!(to = fdopen(tfd, "w")))
/freebsd-10.1-release/usr.bin/chpass/
H A Dchpass.c83 int ch, pfd, tfd; local
211 if ((tfd = pw_tmp(-1)) == -1) {
265 if ((tfd = pw_tmp(-1)) == -1) {
269 if (pw_copy(pfd, tfd, pw, old_pw) == -1) {
/freebsd-10.1-release/contrib/file/src/
H A Dcompress.c244 int tfd; local
250 tfd = open(ptr, O_RDWR|O_TRUNC|O_EXCL|O_CREAT, 0600);
258 tfd = mkstemp(buf);
264 if (tfd == -1) {
270 if (swrite(tfd, startbuf, nbytes) != (ssize_t)nbytes)
274 if (swrite(tfd, buf, (size_t)r) != r)
294 if ((fd = dup2(tfd, fd)) == -1) {
298 (void)close(tfd);
/freebsd-10.1-release/usr.sbin/lpr/lpr/
H A Dlpr.c103 static int tfd; /* control file descriptor */ variable
328 tfd = nfile(tfname);
330 (void) fchown(tfd, pp->daemon_user, -1);
496 (void) close(tfd);
502 if ((tfd = open(tfname, O_RDWR)) >= 0) {
505 if (read(tfd, &touch_c, 1) == 1 &&
506 lseek(tfd, (off_t)0, 0) == 0 &&
507 write(tfd, &touch_c, 1) != 1) {
513 (void) close(tfd);
629 write(tfd, bu
[all...]
/freebsd-10.1-release/usr.sbin/rpc.yppasswdd/
H A Dyppasswdd_server.c458 int pfd, tfd; local
613 if ((tfd = pw_tmp(-1)) == -1) {
618 if (pw_copy(pfd, tfd, &yp_password, NULL) == -1) {
719 int pfd, tfd; local
836 if ((tfd = pw_tmp(-1)) == -1) {
842 if (pw_copy(pfd, tfd, &newpasswd, NULL) == -1) {
/freebsd-10.1-release/lib/libpam/modules/pam_unix/
H A Dpam_unix.c278 int pfd, tfd, retval; local
403 else if ((tfd = pw_tmp(-1)) == -1)
405 else if (pw_copy(pfd, tfd, pwd, old_pwd) == -1)
/freebsd-10.1-release/contrib/ipfilter/ipsend/
H A Dsock.c292 struct tcpcb *find_tcp(tfd, ti)
293 int tfd;
341 if (KMCPY(f, o[tfd], sizeof(*f)) == -1)
343 fprintf(stderr, "read(%#lx,%#lx,%lu) - o[tfd] - failed\n",
344 (u_long)o[tfd], (u_long)f, (u_long)sizeof(*f));
/freebsd-10.1-release/usr.sbin/lpr/lpd/
H A Dprintjob.c105 static int tfd = -1; /* output filter temp file output */ variable
1039 tfd = -1;
1099 tfd = mkstemp(tfile);
1100 if (tfd == -1) {
1106 filtstat = execfilter(pp, filtcmd, av, sfd, tfd);
1125 statrc = fstat(tfd, &stb); /* to find size of tfile */
1134 sfd = tfd;
1223 if (tfd != -1) {
1225 * If tfd is set, then it is the same value as sfd, and
1229 tfd
[all...]
/freebsd-10.1-release/cddl/contrib/opensolaris/tools/ctf/cvt/
H A Doutput.c739 int tfd = -1; local
748 if ((tfd = open(newname, O_RDWR | O_CREAT | O_TRUNC, st.st_mode)) < 0)
750 if ((telf = elf_begin(tfd, ELF_C_WRITE, NULL)) == NULL)
776 (void) close(tfd);
/freebsd-10.1-release/contrib/sendmail/src/
H A Dqueue.c355 int tfd = -1; local
376 tfd = open(tf, TF_OPEN_FLAGS, QueueFileMode); \
395 if (tfd < 0 ||
397 !lockfile(tfd, tf, NULL, LOCK_EX|LOCK_NB) ||
400 (void *) &tfd, SM_IO_WRONLY,
408 tf, (int) geteuid(), tfd, tfp);
421 if (tfd < 0)
424 if (tfd < 0)
439 if (tfd >= 0)
445 if (lockfile(tfd, t
[all...]
/freebsd-10.1-release/usr.sbin/pwd_mkdb/
H A Dpwd_mkdb.c104 int ch, cnt, ypcnt, makeold, tfd, yp_enabled = 0; local
315 if ((tfd = open(buf,
318 if ((oldfp = fdopen(tfd, "w")) == NULL)
/freebsd-10.1-release/usr.bin/make/
H A Djob.c1574 int tfd; /* File descriptor for temp file */ local
1637 if ((tfd = mkstemp(tfile)) == -1)
1639 job->cmdFILE = fdopen(tfd, "w+");
1642 close(tfd);

Completed in 342 milliseconds

12