/illumos-gate/usr/src/cmd/mandoc/ |
H A D | term_tag.c | 54 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 D | term_tag.h | 25 int ofd; /* Original output file descriptor. */ member
|
/illumos-gate/usr/src/cmd/audio/audiorecord/ |
H A D | audiorecord.c | 184 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 D | nvmeadm_wdc.c | 136 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 D | main.c | 2584 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 D | support.c | 168 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 D | ctf_elfwrite.c | 379 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 D | ctf_diff.c | 1084 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 D | runcmd.c | 96 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 D | action.c | 1066 { 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 D | rcp.c | 1420 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 D | print.c | 325 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 D | fsck_main.c | 363 int ifd, ofd; in main() local 428 openFS(argv[optind], &ifd, &ofd); in main() 455 writeBackChanges(ofd); in main()
|
/illumos-gate/usr/src/lib/libxcurses/src/libc/xcurses/ |
H A D | setup.c | 259 __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 D | collect.c | 54 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 D | ifdef.c | 909 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 D | ctfmerge.c | 316 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 D | setup.c | 294 __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 D | main.c | 257 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 D | lpd-job.c | 567 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 D | files.c | 723 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 D | machcpuvar.h | 110 label_t *ofd[HIGH_LEVELS]; /* saved pil ofd */ member
|
/illumos-gate/usr/src/lib/libnsl/rpc/ |
H A D | svc_generic.c | 273 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 D | machcpuvar.h | 125 label_t *ofd[HIGH_LEVELS]; /* saved pil ofd */ member
|
/illumos-gate/usr/src/cmd/lp/lib/papi/ |
H A D | job.c | 306 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()
|