/illumos-gate/usr/src/cmd/ipf/lib/ |
H A D | ipft_hx.c | 26 static int tfd = -1; variable 31 if (tfp && tfd != -1) { 33 return tfd; 37 tfd = 0; 40 tfd = open(fname, O_RDONLY); 41 if (tfd != -1) 42 tfp = fdopen(tfd, "r"); 44 return tfd; 50 int cfd = tfd; in hex_close() 52 tfd = -1; in hex_close()
|
H A D | ipft_td.c | 54 static int tfd = -1; variable 60 if (tfd != -1) 61 return tfd; 64 tfd = 0; 67 tfd = open(fname, O_RDONLY); 68 tfp = fdopen(tfd, "r"); 70 return tfd; 77 return close(tfd); in tcpd_close()
|
H A D | ipft_tx.c | 40 static int tfd = -1; variable 121 if (tfp && tfd != -1) { 123 return tfd; 127 tfd = 0; 130 tfd = open(fname, O_RDONLY); 131 if (tfd != -1) 132 tfp = fdopen(tfd, "r"); 134 return tfd; 140 int cfd = tfd; in text_close() 142 tfd = -1; in text_close()
|
/illumos-gate/usr/src/cmd/mandoc/ |
H A D | term_tag.c | 55 int tfd; in term_tag_init() local 57 ofd = tfd = -1; in term_tag_init() 110 if ((tfd = mkstemp(tag_files.tfn)) == -1) { in term_tag_init() 119 tfd = open(tagfilename, O_WRONLY | O_CREAT | O_EXCL, 0644); in term_tag_init() 120 if (tfd == -1) { in term_tag_init() 126 if ((tag_files.tfs = fdopen(tfd, "w")) == NULL) { in term_tag_init() 130 tfd = -1; in term_tag_init() 142 if (tfd != -1) in term_tag_init() 143 close(tfd); in term_tag_init()
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.sbin/in.talkd/ |
H A D | process.c | 182 int tfd; in find_user() local 197 if ((tfd = open(dev, O_WRONLY|O_NOCTTY)) == -1) { in find_user() 200 if (!isatty(tfd)) { in find_user() 201 (void) close(tfd); in find_user() 212 if (fstat(tfd, &stbuf) < 0 || in find_user() 214 (void) close(tfd); in find_user() 218 (void) close(tfd); in find_user() 223 (void) close(tfd); in find_user()
|
/illumos-gate/usr/src/cmd/bhyve/common/ |
H A D | pci_ahci.c | 159 uint32_t tfd; member 368 ahci_write_fis_sdb(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t tfd) in ahci_write_fis_sdb() argument 373 error = (tfd >> 8) & 0xff; in ahci_write_fis_sdb() 374 tfd &= 0x77; in ahci_write_fis_sdb() 378 fis[2] = tfd; in ahci_write_fis_sdb() 382 p->err_cfis[2] = tfd; in ahci_write_fis_sdb() 389 p->tfd &= ~0x77; in ahci_write_fis_sdb() 390 p->tfd |= tfd; in ahci_write_fis_sdb() 395 ahci_write_fis_d2h(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t tfd) in ahci_write_fis_d2h() argument 400 error = (tfd >> 8) & 0xff; in ahci_write_fis_d2h() [all …]
|
H A D | mevent.c | 605 mevent_add_state(int tfd, enum ev_type type, in mevent_add_state() argument 617 if (tfd < 0 || func == NULL) { in mevent_add_state() 631 if (type != EVF_TIMER && lp->me_fd == tfd && in mevent_add_state() 638 if (type != EVF_TIMER && lp->me_fd == tfd && in mevent_add_state() 653 mevp->me_msecs = tfd; in mevent_add_state() 660 mevp->me_fd = tfd; in mevent_add_state() 695 mevent_add(int tfd, enum ev_type type, in mevent_add() argument 699 return (mevent_add_state(tfd, type, func, param, EV_ADD, 0)); in mevent_add() 703 mevent_add_flags(int tfd, enum ev_type type, int fflags, in mevent_add_flags() argument 707 return (mevent_add_state(tfd, type, func, param, EV_ADD, fflags)); in mevent_add_flags() [all …]
|
/illumos-gate/usr/src/cmd/lp/lib/lp/ |
H A D | tidbit.c | 241 tfd; local 258 tfd = -1; 260 tfd = open_terminfo_file(terminfo, term); 262 if (tfd < 0) 263 tfd = open_terminfo_file(TERMINFO, term); 265 if (tfd >= 0) 266 (void) Fstat(tfd, &statbuf); 268 if (tfd < 0 || !statbuf.st_size) { 280 n = Read(tfd, pt->tiebuf, statbuf.st_size); 281 (void) Close(tfd);
|
/illumos-gate/usr/src/cmd/backup/restore/ |
H A D | restore.c | 943 int fromfd, fromdir, tofd, todir, tfd; in movexattrs() local 947 fromfd = tofd = fromdir = todir = tfd = -1; in movexattrs() 949 resolve(orig, &tfd, &from); in movexattrs() 950 if (tfd == AT_FDCWD && pathconf(orig, _PC_XATTR_EXISTS) != 1) { in movexattrs() 954 if ((fromfd = openat64(tfd, from, O_RDONLY|O_NONBLOCK)) == -1) { in movexattrs() 957 if (tfd != AT_FDCWD) (void) close(tfd); in movexattrs() 963 if (tfd != AT_FDCWD) (void) close(tfd); in movexattrs() 971 if (tfd != AT_FDCWD) in movexattrs() 972 (void) close(tfd); in movexattrs() 975 if (tfd != AT_FDCWD) (void) close(tfd); in movexattrs() [all …]
|
H A D | utilities.c | 1073 int tfd; in resolve() local 1075 *fd = tfd = AT_FDCWD; in resolve() 1079 (*fd = openat64(tfd, *rpath, O_RDONLY)) > 0) { in resolve() 1080 if (tfd != AT_FDCWD) in resolve() 1081 (void) close(tfd); in resolve() 1082 tfd = *fd; in resolve() 1088 if (*fd < 0 || (*fd = openat64(tfd, ".", O_RDONLY|O_XATTR)) < 0) { in resolve() 1095 if (tfd != AT_FDCWD) (void) close(tfd); in resolve()
|
/illumos-gate/usr/src/cmd/sgs/libelf/demo/ |
H A D | dcom.c | 93 int tfd, *shndx, ndx = 1, off = 0; in delete_comment() local 167 if ((tfd = open(tfile, O_RDWR | O_CREAT, 0600)) == -1) { in delete_comment() 175 if ((telf = elf_begin(tfd, ELF_C_WRITE, 0)) == NULL) { in delete_comment() 328 (void) close(tfd); in delete_comment() 338 (void) fchmod(tfd, sbuf.st_mode); in delete_comment() 340 (void) close(tfd); in delete_comment()
|
/illumos-gate/usr/src/lib/libcurses/screen/ |
H A D | setupterm.c | 234 int n, tfd; in setupterm() local 250 tfd = -1; in setupterm() 264 tfd = open(fname, 0); in setupterm() 268 if ((tfd < 0) && (errno == EACCES)) in setupterm() 272 if (tfd < 0) { in setupterm() 280 tfd = open(fname, 0); in setupterm() 287 if (tfd < 0) { in setupterm() 311 n = (int)read(tfd, tiebuf, sizeof (tiebuf)); in setupterm() 312 (void) close(tfd); in setupterm()
|
/illumos-gate/usr/src/uts/common/syscall/ |
H A D | rename.c | 51 renameat(int ffd, char *from, int tfd, char *to) in renameat() argument 61 if ((error = fgetstartvp(tfd, to, &tstartvp)) != 0) in renameat()
|
H A D | link.c | 51 linkat(int ffd, char *from, int tfd, char *to, int flag) in linkat() argument 66 if ((error = fgetstartvp(tfd, to, &tstartvp)) != 0) in linkat()
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.lib/inetd/ |
H A D | repval.c | 458 int tfd; in repvals_to_file() local 469 if ((tfd = mkstemp(genfmri_temp_filename)) == -1) { in repvals_to_file() 473 if (fchmod(tfd, (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == -1) { in repvals_to_file() 474 (void) close(tfd); in repvals_to_file() 479 if ((tfp = fdopen(tfd, "w")) == NULL) { in repvals_to_file() 480 (void) close(tfd); in repvals_to_file()
|
/illumos-gate/usr/src/cmd/logadm/ |
H A D | conf.c | 460 int cfd, tfd; in conf_close() local 507 if ((tfd = mkstemp(tuname)) == -1) in conf_close() 512 if (fchmod(tfd, 0644) == -1) in conf_close() 514 if ((tfp = fdopen(tfd, "w")) == NULL) in conf_close()
|
/illumos-gate/usr/src/lib/libc/port/gen/ |
H A D | ttyname.c | 740 int tfd = open("/dev/console", O_WRONLY); in get_pri_dirs() local 741 if (tfd >= 0) { in get_pri_dirs() 746 (void) write(tfd, buf, strlen(buf)); in get_pri_dirs() 747 (void) close(tfd); in get_pri_dirs()
|
/illumos-gate/usr/src/lib/libcmdutils/common/ |
H A D | process_xattrs.c | 37 get_attrdirs(int indfd, int outdfd, char *attrfile, int *sfd, int *tfd) in get_attrdirs() argument 62 *tfd = fd2; in get_attrdirs()
|
/illumos-gate/usr/src/cmd/lofiadm/ |
H A D | main.c | 1500 int tfd = -1; in lofi_compress() local 1585 if ((tfd = mkstemp64(tmpfilename)) == -1) in lofi_compress() 1665 wbytes = write(tfd, compressed_seg, len_compressed + SEGHDR); in lofi_compress() 1733 if (lseek(tfd, 0, SEEK_SET) != 0) in lofi_compress() 1739 rbytes = read(tfd, compressed_seg, compressed_segsize + SEGHDR); in lofi_compress() 1765 (void) close(tfd); in lofi_compress() 1769 if (tfd != -1) in lofi_compress() 1791 if (tfd != -1) in lofi_compress() 1792 (void) close(tfd); in lofi_compress()
|
/illumos-gate/usr/src/lib/libcontract/common/ |
H A D | libcontract.c | 198 ct_ctl_newct(int cfd, ctevid_t evid, int tfd) in ct_ctl_newct() argument 200 if (ioctl(cfd, CT_CNEWCT, tfd) == -1) in ct_ctl_newct()
|
/illumos-gate/usr/src/lib/libbsm/common/ |
H A D | adt_xlate.h | 147 fd_t tfd; member
|
H A D | adt_token.c | 916 sock = ((union convert *)p_data)->tfd; in adt_to_in_peer()
|
/illumos-gate/usr/src/cmd/sendmail/src/ |
H A D | queue.c | 355 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, tf, NULL, LOCK_EX|LOCK_NB)) [all …]
|
/illumos-gate/usr/src/lib/fm/topo/modules/common/ses/ |
H A D | ses.c | 739 int tfd, len, rval; in ses_create_contract() local 752 tfd = open64(CTFS_ROOT "/device/template", O_RDWR); in ses_create_contract() 753 (void) ct_tmpl_set_critical(tfd, CT_DEV_EV_OFFLINE); in ses_create_contract() 754 (void) ct_tmpl_set_cookie(tfd, (uint64_t)(uintptr_t)stp); in ses_create_contract() 757 if ((rval = ct_dev_tmpl_set_minor(tfd, &link_path[13])) != 0) in ses_create_contract() 760 else if ((rval = ct_tmpl_create(tfd, &stp->set_ctid)) != 0) in ses_create_contract() 764 (void) close(tfd); in ses_create_contract()
|
/illumos-gate/usr/src/cmd/ypcmd/ |
H A D | ypserv.c | 178 int ufd, tfd; in ypinit() local
|