/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()
|
/external/ppp/pppd/ |
D | tty.c | 922 start_charshunt(ifd, ofd) in start_charshunt() argument 923 int ifd, ofd; in start_charshunt() 927 cpid = safe_fork(ifd, ofd, (log_to_fd >= 0? log_to_fd: 2)); 975 charshunt(ifd, ofd, record_file) in charshunt() argument 976 int ifd, ofd; in charshunt() 1038 if (ifd >= FD_SETSIZE || ofd >= FD_SETSIZE || pty_master >= FD_SETSIZE) 1040 ifd, ofd, pty_master); 1060 if (ofd != ifd) { 1061 flags = fcntl(ofd, F_GETFL); 1063 || fcntl(ofd, F_SETFL, flags | O_NONBLOCK) == -1) [all …]
|
/external/dropbear/ |
D | scp.c | 832 int amt, exists, first, mask, mode, ofd, omode; local 991 if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) { 996 if ((bp = allocbuf(&buffer, ofd, 4096)) == NULL) { 997 (void) close(ofd); 1033 if (atomicio(vwrite, ofd, bp->buf, 1048 atomicio(vwrite, ofd, bp->buf, count) != count) { 1052 if (wrerr == NO && ftruncate(ofd, size) != 0) { 1059 if (fchmod(ofd, omode)) { 1070 if (fchmod(ofd, omode & ~mask)) { 1079 if (close(ofd) == -1) {
|
/external/openssh/ |
D | scp.c | 908 int amt, exists, first, ofd; local 1068 if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) { 1073 if ((bp = allocbuf(&buffer, ofd, COPY_BUFLEN)) == NULL) { 1074 (void) close(ofd); 1105 if (atomicio(vwrite, ofd, bp->buf, 1119 atomicio(vwrite, ofd, bp->buf, count) != count) { 1124 ftruncate(ofd, size) != 0) { 1131 if (fchmod(ofd, omode)) { 1142 if (fchmod(ofd, omode & ~mask)) { 1151 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 | 1235 ksh_dup2(int ofd, int nfd, bool errok) in ksh_dup2() argument 1239 if (((rv = dup2(ofd, nfd)) < 0) && !errok && (errno != EBADF)) in ksh_dup2() 1270 restfd(int fd, int ofd) in restfd() argument 1274 if (ofd < 0) in restfd() 1277 else if (fd != ofd) { in restfd() 1279 ksh_dup2(ofd, fd, true); in restfd() 1280 close(ofd); in restfd()
|