Home
last modified time | relevance | path

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

12

/freebsd-14.2/contrib/mandoc/
H A Dterm_tag.c57 ofd = tfd = -1; in term_tag_init()
101 if (ofd == -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()
144 if (tag_files.ofd != -1) { in term_tag_init()
145 close(tag_files.ofd); in term_tag_init()
146 tag_files.ofd = -1; in term_tag_init()
182 if (tag_files.ofd != -1) { in term_tag_close()
186 close(tag_files.ofd); in term_tag_close()
[all …]
/freebsd-14.2/contrib/elftoolchain/elfcopy/
H A Dascii.c51 static void ihex_write_01(int ofd);
157 srec_write_S0(ofd, ofn); in create_srec()
410 create_ihex(int ifd, int ofd) in create_ihex() argument
453 ihex_write_04(ofd, addr_hi); in create_ihex()
464 ihex_write_05(ofd, eh.e_entry); in create_ihex()
465 ihex_write_01(ofd); in create_ihex()
811 srec_write(ofd, dr, addr, p, rlen); in srec_write_Sd()
882 ihex_write(ofd, 0, addr, 0, p, 16); in ihex_write_00()
888 ihex_write_04(ofd, addr_hi); in ihex_write_00()
955 ihex_write_01(int ofd) in ihex_write_01() argument
[all …]
H A Dmain.c653 int efd, ifd, ofd, ofd0, tfd; in create_file() local
675 ac_create_ar(ecp, ifd, ofd); in create_file()
785 if (lseek(ofd, 0, SEEK_SET) < 0) { in create_file()
796 create_binary(ofd, ofd0); in create_file()
799 create_ihex(ofd, ofd0); in create_file()
802 create_srec(ecp, ofd, ofd0, in create_file()
808 create_pe(ecp, ofd, ofd0); in create_file()
821 close(ofd); in create_file()
822 ofd = ofd0; in create_file()
860 ofd = tfd; in create_file()
[all …]
H A Dbinary.c47 create_binary(int ifd, int ofd) in create_binary() argument
63 if (lseek(ofd, baseoff, SEEK_SET) < 0) in create_binary()
119 if (lseek(ofd, off, SEEK_SET) < 0) in create_binary()
123 if (write(ofd, d->d_buf, d->d_size) != (ssize_t) d->d_size) in create_binary()
H A Darchive.c54 static void ac_write_objs(struct elfcopy *ecp, int ofd);
376 ac_create_ar(struct elfcopy *ecp, int ifd, int ofd) in ac_create_ar() argument
381 ac_write_objs(ecp, ofd); in ac_create_ar()
453 ac_write_objs(struct elfcopy *ecp, int ofd) in ac_write_objs() argument
464 AC(archive_write_open_fd(a, ofd)); in ac_write_objs()
/freebsd-14.2/contrib/netbsd-tests/lib/libc/c063/
H A Dt_linkat.c63 int ofd, nfd, fd; in ATF_TC_BODY() local
71 ATF_REQUIRE((ofd = open(ODIR, O_RDONLY, 0)) != -1); in ATF_TC_BODY()
73 ATF_REQUIRE(linkat(ofd, BASEFILE, nfd, BASETARGET, 0) == 0); in ATF_TC_BODY()
74 ATF_REQUIRE(close(ofd) == 0); in ATF_TC_BODY()
149 int ofd, nfd, fd; in ATF_TC_BODY() local
158 ATF_REQUIRE((ofd = open(ODIR, O_RDONLY, 0)) != -1); in ATF_TC_BODY()
160 ATF_REQUIRE(linkat(ofd, BASELINK, nfd, BASETARGET, in ATF_TC_BODY()
162 ATF_REQUIRE(close(ofd) == 0); in ATF_TC_BODY()
182 int ofd, nfd, fd; in ATF_TC_BODY() local
191 ATF_REQUIRE((ofd = open(ODIR, O_RDONLY, 0)) != -1); in ATF_TC_BODY()
[all …]
H A Dt_renameat.c61 int ofd, nfd, fd; in ATF_TC_BODY() local
71 ATF_REQUIRE((ofd = open(ODIR, O_RDONLY, 0)) != -1); in ATF_TC_BODY()
73 ATF_REQUIRE(renameat(ofd, BASEFILE, nfd, BASETARGET) == 0); in ATF_TC_BODY()
74 ATF_REQUIRE(close(ofd) == 0); in ATF_TC_BODY()
/freebsd-14.2/contrib/netbsd-tests/lib/libc/db/
H A Dh_db.c132 if ((ofd = open(optarg, in main()
350 (void)close(ofd); in main()
383 if (ofd == STDOUT_FILENO) in get()
384 (void)write(ofd, "\n", 1); in get()
391 if (ofd != STDOUT_FILENO) in get()
444 if (ofd != STDOUT_FILENO) in rem()
478 if (ofd == STDOUT_FILENO) in seq()
479 (void)write(ofd, "\n", 1); in seq()
486 if (ofd != STDOUT_FILENO) in seq()
525 if (ofd == STDOUT_FILENO) in dump()
[all …]
/freebsd-14.2/lib/libc/db/test/
H A Ddbtest.c113 if ((ofd = open(optarg,
330 (void)close(ofd);
366 if (ofd == STDOUT_FILENO)
367 (void)write(ofd, "\n", 1);
374 if (ofd != STDOUT_FILENO)
431 if (ofd != STDOUT_FILENO)
467 if (ofd == STDOUT_FILENO)
468 (void)write(ofd, "\n", 1);
475 if (ofd != STDOUT_FILENO)
507 if (ofd == STDOUT_FILENO)
[all …]
/freebsd-14.2/contrib/tcsh/
H A Ded.refresh.c597 ofd = o; in update_line()
610 while (ofd < o) { in update_line()
635 if (*ofd == '\0' && *nfd == '\0') { in update_line()
669 if (*ofd) { in update_line()
670 for (c = *ofd, n = nfd; n < nls; n++) { in update_line()
681 osb = ofd; in update_line()
755 if ((ols - ofd) < (nls - nfd)) { in update_line()
771 if ((ols - ofd) > (nls - nfd)) { in update_line()
806 dprintstr("old-ofd", old, ofd); in update_line()
808 dprintstr("ofd-osb", ofd, osb); in update_line()
[all …]
/freebsd-14.2/sys/contrib/openzfs/tests/zfs-tests/cmd/
H A Dstride_dd.c127 int ofd; in main() local
140 ofd = open(ofile, O_WRONLY | O_CREAT, 0666); in main()
141 if (ofd == -1) { in main()
159 if (lseek(ofd, seek * bsize, SEEK_CUR) == -1) { in main()
184 c = write(ofd, buf, bsize); in main()
202 if (lseek(ofd, (stride - 1) * bsize, SEEK_CUR) == -1) { in main()
210 (void) close(ofd); in main()
/freebsd-14.2/contrib/libedit/
H A Drefresh.c554 ofd = o; in re_update_line()
566 while (ofd < o) { in re_update_line()
612 if (*ofd) { in re_update_line()
615 for (o = ofd, p = n; in re_update_line()
627 osb = ofd; in re_update_line()
648 (2 * (p - o) > o - ofd)) { in re_update_line()
692 if ((ols - ofd) < (nls - nfd)) { in re_update_line()
708 if ((ols - ofd) > (nls - nfd)) { in re_update_line()
839 re__strncopy(ofd, nfd, len); in re_update_line()
873 re__strncopy(ofd, nfd, len); in re_update_line()
[all …]
/freebsd-14.2/usr.bin/split/
H A Dsplit.c70 static int ifd = -1, ofd = -1; /* Input/output file descriptors. */ variable
248 if (write(ofd, bfr, dist) != dist) in split1()
257 if (write(ofd, C, bytecnt) != bytecnt) in split1()
265 if (write(ofd, C, len) != len) in split1()
273 if (write(ofd, bfr, len) != len) in split1()
319 if (write(ofd, buf, len) != len) in split2()
372 if (ofd == -1) { in newfile()
379 } else if (close(ofd) != 0) in newfile()
445 if ((ofd = open(fname, flags, DEFFILEMODE)) < 0) { in newfile()
/freebsd-14.2/share/examples/ipfilter/samples/
H A Dproxy.c141 int onoff, ofd, slen; local
160 ofd = socket(AF_INET, SOCK_DGRAM, 0);
165 (void) connect(ofd, (struct sockaddr *)&usin, sizeof(usin));
167 (void) getsockname(ofd, (struct sockaddr *)&usin, &slen);
168 close(ofd);
171 if ((ofd = socket(AF_INET, SOCK_STREAM, 0)) == -1)
174 if (bind(ofd, (struct sockaddr *)&usin, sizeof(usin)))
177 if (getsockname(ofd, (struct sockaddr *)&usin, &slen))
222 if (connect(ofd, (struct sockaddr *)&usin, sizeof(usin)))
225 relay(in, out, ofd);
H A Drelay.c30 int relay(ifd, ofd, rfd) in relay() argument
31 int ifd, ofd, rfd; in relay()
41 if (nfd < ofd)
42 nfd = ofd;
54 FD_SET(ofd, &wfds);
73 if (n && FD_ISSET(ofd, &wfds)) {
74 rw = write(ofd, iwt, iwh - iwt);
/freebsd-14.2/sbin/decryptcore/
H A Ddecryptcore.c117 decrypt(int ofd, const char *privkeyfile, const char *keyfile, in decrypt() argument
131 PJDLOG_ASSERT(ofd >= 0); in decrypt()
146 close(ofd); in decrypt()
151 close(ofd); in decrypt()
289 if (olen > 0 && write(ofd, buf, olen) != olen) { in decrypt()
312 int ch, debug, error, ofd; in main() local
414 ofd = open(core, O_WRONLY | O_CREAT | O_EXCL, 0600); in main()
415 if (ofd == -1) { in main()
420 if (!decrypt(ofd, privatekey, keyfile, encryptedcore)) { in main()
/freebsd-14.2/tools/tools/intel-ucode-split/
H A Dintel-ucode-split.c124 int c, ifd, ofd; in main() local
186 ofd = open(output_file, O_WRONLY | O_CREAT | O_TRUNC, in main()
188 if (ofd < 0) in main()
192 rv = write(ofd, &hdr, sizeof(hdr)); in main()
204 if (write(ofd, buf, len) < (ssize_t)len) in main()
210 close(ofd); in main()
/freebsd-14.2/usr.sbin/lpr/lpd/
H A Dprintjob.c317 (void) close(ofd); in printjob()
365 (void) close(ofd); in printjob()
656 if (write(ofd, buf, n) != n) { in print()
677 fo = ofd; in print()
801 write(ofd, "\031\1", 2); in print()
1460 (void) write(ofd, ":", 1); in banner()
1467 (void) write(ofd, "\n", 1); in banner()
1471 (void) write(ofd, "\n\n", 2); in banner()
1481 (void) write(ofd, "\n", 1); in banner()
1788 ofd = -1; in openpr()
[all …]
/freebsd-14.2/contrib/openpam/lib/libpam/
H A Dopenpam_ttyconv.c82 prompt_tty(int ifd, int ofd, const char *message, char *response, int echo) in prompt_tty() argument
111 if (write(ofd, message, strlen(message)) < 0) { in prompt_tty()
164 write(ofd, " timed out", 10); in prompt_tty()
205 write(ofd, "\n", 1); in prompt_tty()
289 int ifd, ofd, ret; in prompt() local
297 ofd = STDOUT_FILENO; in prompt()
302 ofd = ifd; in prompt()
304 ret = prompt_tty(ifd, ofd, message, response, echo); in prompt()
/freebsd-14.2/sys/dev/ofw/
H A Dofw_disk.c137 phandle_t ofd; in g_ofwd_init() local
147 ofd = OF_finddevice("ofwdisk"); in g_ofwd_init()
148 if (ofd == -1) in g_ofwd_init()
152 OF_package_to_path(ofd, path, 128); in g_ofwd_init()
153 OF_getprop(ofd, "file", fname, sizeof(fname)); in g_ofwd_init()
/freebsd-14.2/usr.bin/ar/
H A Dacpyacc.y61 static int arscp_copy(int ifd, int ofd);
272 int ifd, ofd; in arscp_create() local
284 if ((ofd = mkstemp(tmpac)) < 0) in arscp_create()
296 if (arscp_copy(ifd, ofd)) { in arscp_create()
301 close(ofd); in arscp_create()
310 AC(archive_write_open_fd(a, ofd)); in arscp_create()
325 arscp_copy(int ifd, int ofd) in arscp_copy() argument
342 w = write(ofd, buf, bytes); in arscp_copy()
/freebsd-14.2/crypto/heimdal/appl/rcp/
H A Drcp.c421 int amt, count, exists, first, mask, mode, ofd, omode; in sink() local
564 if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) { in sink()
569 if ((bp = allocbuf(&buffer, ofd, BUFSIZ)) == NULL) { in sink()
570 close(ofd); in sink()
590 j = write(ofd, bp->buf, (size_t)count); in sink()
601 (j = write(ofd, bp->buf, (size_t)count)) != count) { in sink()
605 if (ftruncate(ofd, size)) { in sink()
611 if (fchmod(ofd, omode)) in sink()
616 if (fchmod(ofd, omode & ~mask)) in sink()
620 close(ofd); in sink()
/freebsd-14.2/contrib/elftoolchain/ar/
H A Dacpyacc.y277 int ifd, ofd; in arscp_create() local
289 if ((ofd = mkstemp(tmpac)) < 0) in arscp_create()
298 elftc_copyfile(ifd, ofd) < 0) { in arscp_create()
300 (void) close(ofd); in arscp_create()
306 (void) close(ofd); in arscp_create()
315 AC(archive_write_open_fd(a, ofd)); in arscp_create()
/freebsd-14.2/contrib/elftoolchain/libelftc/
H A Delftc_copyfile.c48 elftc_copyfile(int ifd, int ofd) in elftc_copyfile() argument
99 if ((nw = write(ofd, b, n)) <= 0) in elftc_copyfile()
/freebsd-14.2/bin/pax/
H A Dbuf_subs.c664 rd_wrfile(ARCHD *arcn, int ofd, off_t *left) in rd_wrfile() argument
680 if (fstat(ofd, &sb) == 0) { in rd_wrfile()
703 if ((res = file_write(ofd,bufpt,cnt,&rem,&isem,sz,fnm)) <= 0) { in rd_wrfile()
727 file_flush(ofd, fnm, isem); in rd_wrfile()

12