/freebsd-12-stable/contrib/mandoc/ |
H A D | tag.h | 22 int ofd; member in struct:tag_files
|
H A D | tag.c | 59 int ofd; local 61 ofd = -1; 85 if ((tag_files.ofd = dup(STDOUT_FILENO)) == -1) { 96 if ((ofd = mkstemp(tag_files.ofn)) == -1) { 106 if (dup2(ofd, STDOUT_FILENO) == -1) { 110 close(ofd); 122 if (ofd != -1) 123 close(ofd); 124 if (tag_files.ofd != -1) 125 close(tag_files.ofd); [all...] |
/freebsd-12-stable/contrib/netbsd-tests/lib/libc/c063/ |
H A D | t_linkat.c | 63 int ofd, nfd, fd; local 71 ATF_REQUIRE((ofd = open(ODIR, O_RDONLY, 0)) != -1); 73 ATF_REQUIRE(linkat(ofd, BASEFILE, nfd, BASETARGET, 0) == 0); 74 ATF_REQUIRE(close(ofd) == 0); 149 int ofd, nfd, fd; local 158 ATF_REQUIRE((ofd = open(ODIR, O_RDONLY, 0)) != -1); 160 ATF_REQUIRE(linkat(ofd, BASELINK, nfd, BASETARGET, 162 ATF_REQUIRE(close(ofd) == 0); 182 int ofd, nfd, fd; local 191 ATF_REQUIRE((ofd [all...] |
H A D | t_renameat.c | 61 int ofd, nfd, fd; local 71 ATF_REQUIRE((ofd = open(ODIR, O_RDONLY, 0)) != -1); 73 ATF_REQUIRE(renameat(ofd, BASEFILE, nfd, BASETARGET) == 0); 74 ATF_REQUIRE(close(ofd) == 0);
|
/freebsd-12-stable/contrib/elftoolchain/elfcopy/ |
H A D | ascii.c | 48 static void ihex_write(int ofd, int type, uint64_t addr, uint64_t num, 50 static void ihex_write_00(int ofd, uint64_t addr, const void *buf, size_t sz); 51 static void ihex_write_01(int ofd); 52 static void ihex_write_04(int ofd, uint16_t addr); 53 static void ihex_write_05(int ofd, uint64_t e_entry); 60 static void srec_write(int ofd, char type, uint64_t addr, const void *buf, 62 static void srec_write_symtab(int ofd, const char *ofn, Elf *e, Elf_Scn *scn, 64 static void srec_write_S0(int ofd, const char *ofn); 65 static void srec_write_Sd(int ofd, char dr, uint64_t addr, const void *buf, 67 static void srec_write_Se(int ofd, uint64_ 78 create_srec(struct elfcopy *ecp, int ifd, int ofd, const char *ofn) argument 410 create_ihex(int ifd, int ofd) argument 744 srec_write_symtab(int ofd, const char *ofn, Elf *e, Elf_Scn *scn, GElf_Shdr *sh) argument 796 srec_write_S0(int ofd, const char *ofn) argument 803 srec_write_Sd(int ofd, char dr, uint64_t addr, const void *buf, size_t sz, size_t rlen) argument 820 srec_write_Se(int ofd, uint64_t e_entry, int forceS3) argument 844 srec_write(int ofd, char type, uint64_t addr, const void *buf, size_t sz) argument 873 ihex_write_00(int ofd, uint64_t addr, const void *buf, size_t sz) argument 955 ihex_write_01(int ofd) argument 962 ihex_write_04(int ofd, uint16_t addr) argument 969 ihex_write_05(int ofd, uint64_t e_entry) argument 981 ihex_write(int ofd, int type, uint64_t addr, uint64_t num, const void *buf, size_t sz) argument [all...] |
H A D | binary.c | 47 create_binary(int ifd, int ofd) argument 63 if (lseek(ofd, baseoff, SEEK_SET) < 0) 119 if (lseek(ofd, off, SEEK_SET) < 0) 123 if (write(ofd, d->d_buf, d->d_size) != (ssize_t) d->d_size)
|
H A D | main.c | 632 int efd, ifd, ofd, ofd0, tfd; local 646 create_tempfile(src, &tempfile, &ofd); 648 if ((ofd = open(dst, O_RDWR|O_CREAT, 0755)) == -1) 654 ac_create_ar(ecp, ifd, ofd); 712 if ((ecp->eout = elf_begin(ofd, ELF_C_WRITE, NULL)) == NULL) 745 if (lseek(ofd, 0, SEEK_SET) < 0) 754 create_binary(ofd, ofd0); 757 create_ihex(ofd, ofd0); 760 create_srec(ecp, ofd, ofd0, 766 create_pe(ecp, ofd, ofd [all...] |
/freebsd-12-stable/tools/tools/intel-ucode-split/ |
H A D | intel-ucode-split.c | 126 int c, ifd, ofd; local 188 ofd = open(output_file, O_WRONLY | O_CREAT | O_TRUNC, 190 if (ofd < 0) 194 rv = write(ofd, &hdr, sizeof(hdr)); 206 if (write(ofd, buf, len) < (ssize_t)len) 212 close(ofd);
|
/freebsd-12-stable/contrib/netbsd-tests/lib/libc/db/ |
H A D | h_db.c | 97 static int ofd = STDOUT_FILENO; /* Standard output fd. */ variable 132 if ((ofd = open(optarg, 191 if (ofd == STDOUT_FILENO && (t = strchr(p, '\n')) != NULL) 211 if (write(ofd, p + 1, len - 1) != (ssize_t)len - 1 || 212 write(ofd, "\n", 1) != 1) 350 (void)close(ofd); 382 (void)write(ofd, data.data, data.size); 383 if (ofd == STDOUT_FILENO) 384 (void)write(ofd, "\n", 1); 391 if (ofd ! [all...] |
/freebsd-12-stable/lib/libc/db/test/ |
H A D | dbtest.c | 81 int ofd = STDOUT_FILENO; /* Standard output fd. */ variable 116 if ((ofd = open(optarg, 172 if (ofd == STDOUT_FILENO && (t = strchr(p, '\n')) != NULL) 193 if (write(ofd, p + 1, len - 1) != len - 1 || 194 write(ofd, "\n", 1) != 1) 333 (void)close(ofd); 368 (void)write(ofd, data.data, data.size); 369 if (ofd == STDOUT_FILENO) 370 (void)write(ofd, "\n", 1); 377 if (ofd ! [all...] |
/freebsd-12-stable/contrib/elftoolchain/libelftc/ |
H A D | elftc_copyfile.c | 43 * Copy the contents referenced by 'ifd' to 'ofd'. Returns 0 on 48 elftc_copyfile(int ifd, int ofd) argument 99 if ((nw = write(ofd, b, n)) <= 0)
|
/freebsd-12-stable/usr.bin/split/ |
H A D | split.c | 72 static int ifd = -1, ofd = -1; /* Input/output file descriptors. */ variable 229 if (write(ofd, bfr, dist) != dist) 238 if (write(ofd, 247 if (write(ofd, C, len) != len) 254 if (write(ofd, bfr, len) != len) 301 if (write(ofd, bfr, len) != len) 350 if (ofd == -1) { 357 ofd = fileno(stdout);
|
/freebsd-12-stable/sys/dev/ofw/ |
H A D | ofw_disk.c | 139 phandle_t ofd; local 149 ofd = OF_finddevice("ofwdisk"); 150 if (ofd == -1) 154 OF_package_to_path(ofd, path, 128); 155 OF_getprop(ofd, "file", fname, sizeof(fname));
|
/freebsd-12-stable/contrib/ipfilter/samples/ |
H A D | proxy.c | 142 int onoff, ofd, slen; local 161 ofd = socket(AF_INET, SOCK_DGRAM, 0); 166 (void) connect(ofd, (struct sockaddr *)&usin, sizeof(usin)); 168 (void) getsockname(ofd, (struct sockaddr *)&usin, &slen); 169 close(ofd); 172 if ((ofd = socket(AF_INET, SOCK_STREAM, 0)) == -1) 175 if (bind(ofd, (struct sockaddr *)&usin, sizeof(usin))) 178 if (getsockname(ofd, (struct sockaddr *)&usin, &slen)) 223 if (connect(ofd, (struct sockaddr *)&usin, sizeof(usin))) 226 relay(in, out, ofd); [all...] |
H A D | relay.c | 31 int relay(ifd, ofd, rfd) 32 int ifd, ofd, rfd; 42 if (nfd < ofd) 43 nfd = ofd; 55 FD_SET(ofd, &wfds); 74 if (n && FD_ISSET(ofd, &wfds)) { 75 rw = write(ofd, iwt, iwh - iwt);
|
/freebsd-12-stable/contrib/tcsh/ |
H A D | ed.refresh.c | 588 Char *ofd, *ols, *oe, *nfd, *nls, *ne; local 597 ofd = o; 610 while (ofd < o) { 635 if (*ofd == '\0' && *nfd == '\0') { 645 while ((o > ofd) && (n > nfd) && (*--o == *--n)) 667 * case 1: insert: scan from nfd to nls looking for *ofd 669 if (*ofd) { 670 for (c = *ofd, n = nfd; n < nls; n++) { 672 for (o = ofd, p = n; p < nls && o < ols && *o == *p; o++, p++) 681 osb = ofd; [all...] |
/freebsd-12-stable/contrib/libedit/ |
H A D | refresh.c | 541 wchar_t *ofd, *ols, *oe, *nfd, *nls, *ne; local 551 ofd = o; 563 while (ofd < o) { 586 if (*ofd == '\0' && *nfd == '\0') { 593 while ((o > ofd) && (n > nfd) && (*--o == *--n)) 607 * case 1: insert: scan from nfd to nls looking for *ofd 609 if (*ofd) { 610 for (c = *ofd, n = nfd; n < nls; n++) { 612 for (o = ofd, p = n; 624 osb = ofd; [all...] |
/freebsd-12-stable/sbin/decryptcore/ |
H A D | decryptcore.c | 119 decrypt(int ofd, const char *privkeyfile, const char *keyfile, argument 132 PJDLOG_ASSERT(ofd >= 0); 147 close(ofd); 152 close(ofd); 251 if (olen > 0 && write(ofd, buf, olen) != olen) { 274 int ch, debug, error, ofd; local 376 ofd = open(core, O_WRONLY | O_CREAT | O_EXCL, 0600); 377 if (ofd == -1) { 382 if (!decrypt(ofd, privatekey, keyfile, encryptedcore)) {
|
/freebsd-12-stable/contrib/openpam/lib/libpam/ |
H A D | openpam_ttyconv.c | 84 prompt_tty(int ifd, int ofd, const char *message, char *response, int echo) argument 98 if (write(ofd, message, strlen(message)) < 0) { 166 write(ofd, " timed out", 10); 207 write(ofd, "\n", 1); 291 int ifd, ofd, ret; local 299 ofd = STDOUT_FILENO; 304 ofd = ifd; 306 ret = prompt_tty(ifd, ofd, message, response, echo);
|
/freebsd-12-stable/usr.sbin/lpr/lpd/ |
H A D | printjob.c | 106 static int ofd; /* output filter file descriptor */ variable 319 (void) close(ofd); 361 (void) write(ofd, pp->form_feed, 364 (void) write(ofd, pp->trailer, 367 (void) close(ofd); 651 (void) write(ofd, pp->form_feed, strlen(pp->form_feed)); 658 if (write(ofd, buf, n) != n) { 679 fo = ofd; 803 write(ofd, "\031\1", 2); 1458 (void) write(ofd, p [all...] |
/freebsd-12-stable/usr.bin/ar/ |
H A D | acpyacc.y | 64 static int arscp_copy(int ifd, int ofd); 275 int ifd, ofd; 287 if ((ofd = mkstemp(tmpac)) < 0) 299 if (arscp_copy(ifd, ofd)) { 304 close(ofd); 314 AC(archive_write_open_fd(a, ofd)); 329 arscp_copy(int ifd, int ofd) 346 w = write(ofd, buf, bytes);
|
/freebsd-12-stable/crypto/heimdal/appl/rcp/ |
H A D | rcp.c | 421 int amt, count, exists, first, mask, mode, ofd, omode; local 564 if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) { 569 if ((bp = allocbuf(&buffer, ofd, BUFSIZ)) == NULL) { 570 close(ofd); 590 j = write(ofd, bp->buf, (size_t)count); 601 (j = write(ofd, bp->buf, (size_t)count)) != count) { 605 if (ftruncate(ofd, size)) { 611 if (fchmod(ofd, omode)) 616 if (fchmod(ofd, omode & ~mask)) 620 close(ofd); [all...] |
/freebsd-12-stable/sys/mips/cavium/ |
H A D | octeon_machdep.c | 281 const struct octeon_feature_description *ofd; local 391 for (ofd = octeon_feature_descriptions; ofd->ofd_string != NULL; ofd++) 392 if (octeon_has_feature(ofd->ofd_feature)) 393 printf(" %s", ofd->ofd_string);
|
/freebsd-12-stable/contrib/elftoolchain/ar/ |
H A D | acpyacc.y | 277 int ifd, ofd; 289 if ((ofd = mkstemp(tmpac)) < 0) 298 elftc_copyfile(ifd, ofd) < 0) { 300 (void) close(ofd); 306 (void) close(ofd); 315 AC(archive_write_open_fd(a, ofd));
|
/freebsd-12-stable/bin/pax/ |
H A D | buf_subs.c | 666 rd_wrfile(ARCHD *arcn, int ofd, off_t *left) argument 682 if (fstat(ofd, &sb) == 0) { 705 if ((res = file_write(ofd,bufpt,cnt,&rem,&isem,sz,fnm)) <= 0) { 729 file_flush(ofd, fnm, isem);
|