Home
last modified time | relevance | path

Searched refs:ofd (Results 1 – 25 of 34) sorted by relevance

12

/illumos-gate/usr/src/cmd/mandoc/
H A Dterm_tag.c54 int ofd; /* In /tmp/, dup(2)ed to stdout. */ in term_tag_init() local
57 ofd = tfd = -1; in term_tag_init()
81 if ((tag_files.ofd = dup(STDOUT_FILENO)) == -1) { in term_tag_init()
91 if ((ofd = mkstemps(tag_files.ofn, strlen(suffix))) == -1) { in term_tag_init()
100 ofd = open(outfilename, O_WRONLY | O_CREAT | O_EXCL, 0644); in term_tag_init()
101 if (ofd == -1) { in term_tag_init()
131 if (dup2(ofd, STDOUT_FILENO) == -1) { in term_tag_init()
135 close(ofd); in term_tag_init()
140 if (ofd != -1) in term_tag_init()
141 close(ofd); in term_tag_init()
[all …]
H A Dterm_tag.h25 int ofd; /* Original output file descriptor. */ member
/illumos-gate/usr/src/cmd/audio/audiorecord/
H A Daudiorecord.c184 int ofd; in main() local
370 ofd = fileno(stdout); in main()
373 ofd = open(Ofile, in main()
375 if (ofd < 0) { in main()
387 if ((fstat(ofd, &st) < 0) || (!S_ISREG(st.st_mode))) { in main()
398 err = audio_read_filehdr(ofd, &File_hdr, &file_type, in main()
454 ((err = (int)lseek(ofd, 0L, SEEK_CUR)) >= 0)) { in main()
464 if ((int)lseek(ofd, st.st_size, SEEK_SET) < 0) { in main()
593 } else if (!isatty(ofd)) { in main()
594 if (audio_write_filehdr(ofd, &Dev_hdr, File_type, Info, in main()
[all …]
/illumos-gate/usr/src/cmd/nvmeadm/
H A Dnvmeadm_wdc.c136 int ofd; in do_wdc_e6dump() local
146 ofd = open(e6->e6_output, O_RDWR | O_CREAT | O_TRUNC, 0644); in do_wdc_e6dump()
147 if (ofd < 0) { in do_wdc_e6dump()
184 wdc_e6_write(ofd, buf, sizeof (wdc_e6_header_t)); in do_wdc_e6dump()
194 wdc_e6_write(ofd, buf, toread); in do_wdc_e6dump()
201 VERIFY0(close(ofd)); in do_wdc_e6dump()
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/pppd/
H A Dmain.c2584 start_charshunt(ifd, ofd) in start_charshunt() argument
2585 int ifd, ofd; in start_charshunt()
2604 charshunt(ifd, ofd, record_file);
2638 charshunt(ifd, ofd, record_file) in charshunt() argument
2639 int ifd, ofd; in charshunt()
2716 if (ofd != ifd) {
2717 flags = fcntl(ofd, F_GETFL);
2719 || fcntl(ofd, F_SETFL, flags | O_NONBLOCK) == -1)
2735 nfds = (ofd > pty_master? ofd: pty_master) + 1;
2746 while (nibuf != 0 || nobuf != 0 || ofd >= 0 || pty_master >= 0) {
[all …]
/illumos-gate/usr/src/cmd/sgs/libld/common/
H A Dsupport.c168 ld_sup_open(Ofl_desc *ofl, const char **opath, const char **ofile, int *ofd, in ld_sup_open() argument
178 int nfd = *ofd; in ld_sup_open()
216 if ((npath != *opath) || (nfd != *ofd) || (nelf != *oelf)) { in ld_sup_open()
218 *opath, npath, *ofd, nfd, *oelf, nelf)); in ld_sup_open()
223 *ofd = nfd; in ld_sup_open()
/illumos-gate/usr/src/lib/libctf/common/
H A Dctf_elfwrite.c379 ctf_elffdwrite(ctf_file_t *fp, int ifd, int ofd, int flags) in ctf_elffdwrite() argument
388 if ((oelf = elf_begin(ofd, ELF_C_WRITE, NULL)) == NULL) in ctf_elffdwrite()
403 int ifd, ofd, ret; in ctf_elfwrite() local
411 if ((ofd = open(output, O_RDWR | O_CREAT | O_TRUNC, st.st_mode)) < 0) in ctf_elfwrite()
414 ret = ctf_elffdwrite(fp, ifd, ofd, flags); in ctf_elfwrite()
418 if (close(ofd) != 0 && ret == 0) in ctf_elfwrite()
H A Dctf_diff.c1084 ctf_diff_func_t *ifd, *ofd; in ctf_diff_func_fill() local
1089 ofd = &cds->cds_ofuncs[j]; in ctf_diff_func_fill()
1090 if (strcmp(ifd->cdf_name, ofd->cdf_name) != 0) in ctf_diff_func_fill()
1097 ret = ctf_func_info(cds->cds_ofp, ofd->cdf_symidx, in ctf_diff_func_fill()
1140 if ((ret = ctf_func_args(cds->cds_ofp, ofd->cdf_symidx, in ctf_diff_func_fill()
1156 ofd->cdf_matchidx = i; in ctf_diff_func_fill()
/illumos-gate/usr/src/lib/libpkg/common/
H A Druncmd.c96 esystem(char *cmd, int ifd, int ofd) in esystem() argument
143 if (ofd >= 0 && ofd != STDOUT_FILENO) { in esystem()
144 (void) dup2(ofd, STDOUT_FILENO); in esystem()
/illumos-gate/usr/src/cmd/filesync/
H A Daction.c1066 { int ifd, ofd, count, ret; in copy() local
1141 ofd = -1; in copy()
1144 ofd = creat(dst, mode); in copy()
1146 if (ofd < 0) { in copy()
1172 (void) lseek(ofd, (off_t) count, SEEK_CUR); in copy()
1184 ret = write(ofd, (char *) inbuf, count); in copy()
1202 (void) lseek(ofd, (off_t)-1, SEEK_CUR); in copy()
1203 (void) write(ofd, "", 1); in copy()
1210 ftruncate(ofd, (off_t) 0); in copy()
1213 close(ofd); in copy()
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/
H A Drcp.c1420 int ofd, setimes, targisdir, wrerr; in sink() local
1600 if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) { in sink()
1610 zopen(ofd, zflag && !exists); in sink()
1613 (void) fchmod(ofd, mode); in sink()
1622 if (recvacl(ofd, exists, pflag) == ACL_FAIL) { in sink()
1623 (void) close(ofd); in sink()
1630 if ((bp = allocbuf(&buffer, ofd, RCP_BUFSIZE)) == 0) { in sink()
1631 (void) close(ofd); in sink()
1658 size = lseek(ofd, 0, SEEK_CUR); in sink()
1659 if ((ftruncate(ofd, size) == -1) && in sink()
[all …]
/illumos-gate/usr/src/cmd/sh/
H A Dprint.c325 int ofd; in setb() local
327 if ((ofd = buffd) == -1) { in setb()
344 return (ofd); in setb()
/illumos-gate/usr/src/cmd/fs.d/pcfs/fsck/
H A Dfsck.c342 int ifd, ofd; in main() local
404 openFS(argv[optind], &ifd, &ofd); in main()
431 writeBackChanges(ofd); in main()
/illumos-gate/usr/src/lib/libxcurses/src/libc/xcurses/
H A Dsetup.c259 __m_setupterm(termname, ifd, ofd, err_return) in __m_setupterm() argument
261 int ifd, ofd;
282 if (isatty(cur_term->_ifd = ofd))
295 (void) restartterm(termname, ofd, &err_code);
/illumos-gate/usr/src/cmd/mailx/
H A Dcollect.c54 static void cpout(char *str, FILE *ofd);
1329 cpout(char *str, FILE *ofd) in cpout() argument
1337 putc('\n', ofd); in cpout()
1341 putc('\t', ofd); in cpout()
1345 putc('\\', ofd); in cpout()
1348 putc(*cp, ofd); in cpout()
1352 putc('\n', ofd); in cpout()
1353 fflush(ofd); in cpout()
/illumos-gate/usr/src/cmd/lp/filter/postscript/postio/
H A Difdef.c909 int ofd; /* for saving and restoring stderr */ in dkhost_connect() local
931 ofd = dup(2); in dkhost_connect()
946 dup(ofd); in dkhost_connect()
947 close(ofd); in dkhost_connect()
/illumos-gate/usr/src/cmd/ctfmerge/
H A Dctfmerge.c316 int err, i, c, ofd; in main() local
389 if ((ofd = open(g_outfile, O_RDWR)) < 0) in main()
401 cmh = ctf_merge_init(ofd, &err); in main()
/illumos-gate/usr/src/lib/libxcurses2/src/libc/xcurses/
H A Dsetup.c294 __m_setupterm(char *termname, int ifd, int ofd, int *err_return) in __m_setupterm() argument
315 if (isatty(cur_term->_ofd = ofd)) in __m_setupterm()
336 (void) restartterm(termname, ofd, &err_code); in __m_setupterm()
/illumos-gate/usr/src/cmd/truss/
H A Dmain.c257 int ofd = -1; in main() local
415 if (ofd >= 0) in main()
416 (void) close(ofd); in main()
417 if ((ofd = xcreat(optarg)) < 0) { in main()
548 setoutput(ofd); /* establish truss output */ in main()
2024 setoutput(int ofd) in setoutput() argument
2026 if (ofd < 0) { in setoutput()
2029 } else if (ofd != 1) { in setoutput()
2031 (void) fcntl(ofd, F_DUPFD, 1); in setoutput()
2032 (void) close(ofd); in setoutput()
[all …]
/illumos-gate/usr/src/lib/print/libpapi-lpd/common/
H A Dlpd-job.c567 int *ofd) in lpd_submit_job() argument
611 if (ofd != NULL) in lpd_submit_job()
612 *ofd = fd; in lpd_submit_job()
/illumos-gate/usr/src/cmd/sgs/liblddbg/common/
H A Dfiles.c723 const char *nname, int ofd, int nfd, Elf *oelf, Elf *nelf) in Dbg_file_modified() argument
737 if (nfd != ofd) { in Dbg_file_modified()
742 dbg_print(lml, MSG_INTL(MSG_FIL_FDCHANGE), ofd, nfd, str); in Dbg_file_modified()
/illumos-gate/usr/src/uts/sun4u/sys/
H A Dmachcpuvar.h110 label_t *ofd[HIGH_LEVELS]; /* saved pil ofd */ member
/illumos-gate/usr/src/lib/libnsl/rpc/
H A Dsvc_generic.c273 svc_tli_create_common(const int ofd, const struct netconfig *nconf, in svc_tli_create_common() argument
282 int fd = ofd; in svc_tli_create_common()
/illumos-gate/usr/src/uts/sun4v/sys/
H A Dmachcpuvar.h125 label_t *ofd[HIGH_LEVELS]; /* saved pil ofd */ member
/illumos-gate/usr/src/cmd/lp/lib/papi/
H A Djob.c306 int ifd, ofd; in copy_file() local
313 if ((ofd = open(to, O_WRONLY)) < 0) { in copy_file()
319 write(ofd, buf, rc); in copy_file()
322 close(ofd); in copy_file()

12