Searched refs:ofd (Results 1 - 25 of 38) sorted by relevance

12

/freebsd-11-stable/contrib/mdocml/
H A Dtag.h21 int ofd; member in struct:tag_files
H A Dtag.c56 int ofd; local
58 ofd = -1;
82 if ((tag_files.ofd = dup(STDOUT_FILENO)) == -1)
91 if ((ofd = mkstemp(tag_files.ofn)) == -1)
95 if (dup2(ofd, STDOUT_FILENO) == -1)
97 close(ofd);
109 if (ofd != -1)
110 close(ofd);
111 if (tag_files.ofd != -1)
112 close(tag_files.ofd);
[all...]
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/c063/
H A Dt_linkat.c63 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 Dt_renameat.c61 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-11-stable/contrib/elftoolchain/elfcopy/
H A Dascii.c48 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 Dbinary.c47 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 Dmain.c632 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-11-stable/lib/libc/db/test/
H A Ddbtest.c79 int ofd = STDOUT_FILENO; /* Standard output fd. */ variable
114 if ((ofd = open(optarg,
170 if (ofd == STDOUT_FILENO && (t = strchr(p, '\n')) != NULL)
191 if (write(ofd, p + 1, len - 1) != len - 1 ||
192 write(ofd, "\n", 1) != 1)
331 (void)close(ofd);
366 (void)write(ofd, data.data, data.size);
367 if (ofd == STDOUT_FILENO)
368 (void)write(ofd, "\n", 1);
375 if (ofd !
[all...]
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/db/
H A Dh_db.c97 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-11-stable/contrib/elftoolchain/libelftc/
H A Delftc_copyfile.c43 * 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-11-stable/usr.bin/split/
H A Dsplit.c70 static int ifd = -1, ofd = -1; /* Input/output file descriptors. */ variable
227 if (write(ofd, bfr, dist) != dist)
236 if (write(ofd,
245 if (write(ofd, C, len) != len)
252 if (write(ofd, bfr, len) != len)
299 if (write(ofd, bfr, len) != len)
348 if (ofd == -1) {
355 ofd = fileno(stdout);
/freebsd-11-stable/sys/dev/ofw/
H A Dofw_disk.c137 phandle_t ofd; local
147 ofd = OF_finddevice("ofwdisk");
148 if (ofd == -1)
152 OF_package_to_path(ofd, path, 128);
153 OF_getprop(ofd, "file", fname, sizeof(fname));
/freebsd-11-stable/contrib/ipfilter/samples/
H A Dproxy.c142 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 Drelay.c31 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-11-stable/lib/libedit/
H A Drefresh.c508 Char *ofd, *ols, *oe, *nfd, *nls, *ne; local
518 ofd = o;
530 while (ofd < o) {
553 if (*ofd == '\0' && *nfd == '\0') {
560 while ((o > ofd) && (n > nfd) && (*--o == *--n))
574 * case 1: insert: scan from nfd to nls looking for *ofd
576 if (*ofd) {
577 for (c = *ofd, n = nfd; n < nls; n++) {
579 for (o = ofd, p = n;
591 osb = ofd;
[all...]
/freebsd-11-stable/contrib/tcsh/
H A Ded.refresh.c588 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-11-stable/contrib/openpam/lib/libpam/
H A Dopenpam_ttyconv.c84 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-11-stable/usr.sbin/lpr/lpd/
H A Dprintjob.c104 static int ofd; /* output filter file descriptor */ variable
317 (void) close(ofd);
359 (void) write(ofd, pp->form_feed,
362 (void) write(ofd, pp->trailer,
365 (void) close(ofd);
649 (void) write(ofd, pp->form_feed, strlen(pp->form_feed));
656 if (write(ofd, buf, n) != n) {
677 fo = ofd;
801 write(ofd, "\031\1", 2);
1456 (void) write(ofd, p
[all...]
/freebsd-11-stable/usr.bin/ar/
H A Dacpyacc.y64 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-11-stable/bin/rcp/
H A Drcp.c498 int amt, exists, first, mask, mode, ofd, omode; local
640 if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) {
645 if ((bp = allocbuf(&buffer, ofd, BUFSIZ)) == NULL) {
646 (void)close(ofd);
669 j = write(ofd, bp->buf, count);
680 (j = write(ofd, bp->buf, count)) != (off_t)count) {
684 if (ftruncate(ofd, size)) {
690 if (fchmod(ofd, omode))
695 if (fchmod(ofd, omode & ~mask))
699 (void)close(ofd);
[all...]
/freebsd-11-stable/crypto/heimdal/appl/rcp/
H A Drcp.c421 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-11-stable/sys/mips/cavium/
H A Docteon_machdep.c276 const struct octeon_feature_description *ofd; local
387 for (ofd = octeon_feature_descriptions; ofd->ofd_string != NULL; ofd++)
388 if (octeon_has_feature(ofd->ofd_feature))
389 printf(" %s", ofd->ofd_string);
/freebsd-11-stable/contrib/elftoolchain/ar/
H A Dacpyacc.y277 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-11-stable/contrib/libreadline/
H A Ddisplay.c1217 register char *ofd, *ols, *oe, *nfd, *nls, *ne; local
1316 ofd = old + temp;
1326 ofd = old + omax;
1332 for (ofd = old, nfd = new;
1333 (ofd - old < omax) && *ofd &&
1338 ofd = old + old_offset;
1346 for (ofd = old, nfd = new;
1347 (ofd - old < omax) && *ofd
[all...]
/freebsd-11-stable/crypto/openssh/
H A Dscp.c929 int amt, exists, first, ofd; local
1106 if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) {
1111 if ((bp = allocbuf(&buffer, ofd, COPY_BUFLEN)) == NULL) {
1112 (void) close(ofd);
1143 if (atomicio(vwrite, ofd, bp->buf,
1155 atomicio(vwrite, ofd, bp->buf, count) != count) {
1160 ftruncate(ofd, size) != 0) {
1167 if (fchmod(ofd, omode)) {
1178 if (fchmod(ofd, omode & ~mask)) {
1187 if (close(ofd)
[all...]

Completed in 273 milliseconds

12