/external/libnl/lib/ |
D | handlers.c | 34 static void print_header_content(FILE *ofd, struct nlmsghdr *n) in print_header_content() argument 39 fprintf(ofd, "type=%s length=%u flags=<%s> sequence-nr=%u pid=%u", in print_header_content() 47 FILE *ofd = arg ? arg : stdout; in nl_valid_handler_verbose() local 49 fprintf(ofd, "-- Warning: unhandled valid message: "); in nl_valid_handler_verbose() 50 print_header_content(ofd, nlmsg_hdr(msg)); in nl_valid_handler_verbose() 51 fprintf(ofd, "\n"); in nl_valid_handler_verbose() 58 FILE *ofd = arg ? arg : stderr; in nl_invalid_handler_verbose() local 60 fprintf(ofd, "-- Error: Invalid message: "); in nl_invalid_handler_verbose() 61 print_header_content(ofd, nlmsg_hdr(msg)); in nl_invalid_handler_verbose() 62 fprintf(ofd, "\n"); in nl_invalid_handler_verbose() [all …]
|
D | msg.c | 755 static void prefix_line(FILE *ofd, int prefix) in prefix_line() argument 760 fprintf(ofd, " "); in prefix_line() 763 static inline void dump_hex(FILE *ofd, char *start, int len, int prefix) in dump_hex() argument 769 prefix_line(ofd, prefix); in dump_hex() 770 fprintf(ofd, " "); in dump_hex() 775 fprintf(ofd, "%02x ", v); in dump_hex() 779 fprintf(ofd, "%s\n", ascii); in dump_hex() 781 prefix_line(ofd, prefix); in dump_hex() 782 fprintf(ofd, " "); in dump_hex() 791 fprintf(ofd, " "); in dump_hex() [all …]
|
/external/bison/lib/ |
D | spawn-pipe.c | 125 int ofd[2]; in create_pipe() local 142 if (pipe2_safer (ofd, O_BINARY | O_CLOEXEC) < 0) in create_pipe() 166 if ((!pipe_stdin || dup2 (ofd[0], STDIN_FILENO) >= 0) in create_pipe() 227 close (ofd[0]); in create_pipe() 238 close (ofd[1]); in create_pipe() 246 fd[1] = ofd[1]; in create_pipe() 253 int ofd[2]; in create_pipe() 266 if (pipe_safer (ofd) < 0) in create_pipe() 288 ofd[0], STDIN_FILENO)) in create_pipe() 295 && (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) in create_pipe() [all …]
|
/external/e2fsprogs/util/ |
D | copy_sparse.c | 93 long lb, i, fd, ofd, bs, block, numblocks; in copy_sparse_file() local 135 ofd = open(dest, O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0777); in copy_sparse_file() 136 if (ofd < 0) { in copy_sparse_file() 160 if (lseek64(ofd, should_be, SEEK_SET) == (off_t) -1) { in copy_sparse_file() 177 lseek(ofd, bs, SEEK_CUR); in copy_sparse_file() 182 got2 = write(ofd, buf, got); in copy_sparse_file() 190 if (fstat64(ofd, &fileinfo) < 0) { in copy_sparse_file() 195 lseek64(ofd, offset-1, SEEK_CUR); in copy_sparse_file() 197 write(ofd, buf, 1); in copy_sparse_file() 200 close(ofd); in copy_sparse_file()
|
D | subst.c | 326 int fd, ofd = -1; in main() local 377 ofd = open(newfn, O_CREAT|O_TRUNC|O_RDWR, 0644); in main() 378 if (ofd < 0) { in main() 382 out = fdopen(ofd, "w+"); in main() 436 if (ofd >= 0) in main() 437 (void) fchmod(ofd, 0444); in main() 444 if (ofd >= 0) in main() 445 (void) fchmod(ofd, 0444); in main()
|
/external/libedit/src/ |
D | refresh.c | 504 Char *ofd, *ols, *oe, *nfd, *nls, *ne; in re_update_line() local 514 ofd = o; in re_update_line() 526 while (ofd < o) { in re_update_line() 549 if (*ofd == '\0' && *nfd == '\0') { in re_update_line() 556 while ((o > ofd) && (n > nfd) && (*--o == *--n)) in re_update_line() 572 if (*ofd) { in re_update_line() 573 for (c = *ofd, n = nfd; n < nls; n++) { in re_update_line() 575 for (o = ofd, p = n; in re_update_line() 587 osb = ofd; in re_update_line() 597 for (c = *nfd, o = ofd; o < ols; o++) { in re_update_line() [all …]
|
/external/ltp/testcases/kernel/syscalls/dup2/ |
D | dup202.c | 89 int i, ofd; in main() local 103 if ((ofd = creat(testfile, TC[i].mode)) == -1) in main() 107 TEST(dup2(ofd, *TC[i].nfd)); in main() 116 if (fstat(ofd, &oldbuf) == -1) in main() 135 if (close(ofd) == -1) in main()
|
D | dup201.c | 83 int *ofd; member 122 TEST(dup2(*TC[i].ofd, *TC[i].nfd)); in main()
|
/external/toybox/toys/posix/ |
D | uudecode.c | 29 int ifd = 0, ofd, idx = 0, m = m; local 44 if (TT.o && !strcmp(TT.o, "-")) ofd = 1; 45 else ofd = xcreate(TT.o ? TT.o : line+idx, O_WRONLY|O_CREAT|O_TRUNC, 101 xwrite(ofd, line, out-line); 106 close(ofd);
|
/external/ppp/pppd/ |
D | tty.c | 926 start_charshunt(ifd, ofd) in start_charshunt() argument 927 int ifd, ofd; in start_charshunt() 931 cpid = safe_fork(ifd, ofd, (log_to_fd >= 0? log_to_fd: 2)); 978 charshunt(ifd, ofd, record_file) in charshunt() argument 979 int ifd, ofd; in charshunt() 1041 if (ifd >= FD_SETSIZE || ofd >= FD_SETSIZE || pty_master >= FD_SETSIZE) 1043 ifd, ofd, pty_master); 1063 if (ofd != ifd) { 1064 flags = fcntl(ofd, F_GETFL); 1066 || fcntl(ofd, F_SETFL, flags | O_NONBLOCK) == -1) [all …]
|
/external/bison/m4/ |
D | posix_spawn.m4 | 149 int ofd[2]; 163 if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0) 179 (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0 180 || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0 181 || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0 205 close (ofd[0]); 206 close (ofd[1]);
|
/external/openssh/ |
D | scp.c | 929 int amt, exists, first, ofd; local 1105 if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) { 1110 if ((bp = allocbuf(&buffer, ofd, COPY_BUFLEN)) == NULL) { 1111 (void) close(ofd); 1142 if (atomicio(vwrite, ofd, bp->buf, 1154 atomicio(vwrite, ofd, bp->buf, count) != count) { 1159 ftruncate(ofd, size) != 0) { 1166 if (fchmod(ofd, omode)) { 1177 if (fchmod(ofd, omode & ~mask)) { 1186 if (close(ofd) == -1) {
|
/external/blktrace/ |
D | blktrace.c | 264 int ifd, ofd; member 1443 ret = sendfile(iop->ofd, iop->ifd, NULL, iop->ready); in net_sendfile() 1460 if (net_send_header(iop->ofd, tp->cpu, dpp->buts_name, iop->ready)) in net_sendfile_data() 1530 iop->ofd = -1; in iop_open() 1548 iop->ofd = fileno(iop->ofp); in iop_open() 1584 else if (iop->ofd >= 0) { in close_ios() 1587 net_send_close(iop->ofd, dpp->buts_name, dpp->drops); in close_ios() 1588 net_close_connection(&iop->ofd); in close_ios() 1615 iop->ofd = -1; in open_ios() 1634 iop->ofd = net_setup_client(); in open_ios() [all …]
|
/external/blktrace/btreplay/ |
D | btreplay.c | 113 int cpu, ifd, ofd, iterations; member 736 io_prep_pread(iop, iocbp->tip->ofd, buf, n, off); in iocb_setup() 739 io_prep_pwrite(iop, iocbp->tip->ofd, buf, n, off); in iocb_setup() 770 tip->ofd = -1; in tip_init() 937 close(tip->ofd); in rem_input_file() 1331 tip->ofd = open(path, O_RDWR | O_DIRECT | oflags); in replay_sub() 1332 if (tip->ofd < 0) { in replay_sub()
|
/external/mksh/src/ |
D | main.c | 1469 ksh_dup2(int ofd, int nfd, bool errok) in ksh_dup2() argument 1473 if (((rv = dup2(ofd, nfd)) < 0) && !errok && (errno != EBADF)) in ksh_dup2() 1504 restfd(int fd, int ofd) in restfd() argument 1508 if (ofd < 0) in restfd() 1511 else if (fd != ofd) { in restfd() 1513 ksh_dup2(ofd, fd, true); in restfd() 1514 close(ofd); in restfd()
|
/external/iproute2/tc/ |
D | tc_bpf.c | 797 int ret, cfd, ofd, ffd; in bpf_obj_hash() local 817 ofd = accept(cfd, NULL, 0); in bpf_obj_hash() 818 if (ofd < 0) { in bpf_obj_hash() 821 ret = ofd; in bpf_obj_hash() 840 size = sendfile(ofd, ffd, NULL, stbuff.st_size); in bpf_obj_hash() 848 size = read(ofd, out, len); in bpf_obj_hash() 859 close(ofd); in bpf_obj_hash()
|
/external/libnl/ |
D | make.log | 107 dump_hex(ofd, nla_data(nla) + alen, 254 dump_hex(ofd, nla_data(nla) + alen,
|
/external/bison/ |
D | configure | 18479 int ofd[2]; 18493 if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0) 18509 (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0 18510 || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0 18511 || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0 18535 close (ofd[0]); 18536 close (ofd[1]);
|