Lines Matching refs:ofd
2238 webdav_fcopyfile_sz (int ifd, int ofd, off_t isz) in webdav_fcopyfile_sz() argument
2254 if (0 == fcopyfile(ifd, ofd, NULL, COPYFILE_ALL)) in webdav_fcopyfile_sz()
2258 if (0 != lseek(ofd, 0, SEEK_SET)) return -1; in webdav_fcopyfile_sz()
2263 if (0 == elftc_copyfile(ifd, ofd)) in webdav_fcopyfile_sz()
2267 if (0 != lseek(ofd, 0, SEEK_SET)) return -1; in webdav_fcopyfile_sz()
2276 while (offset < isz && sendfile(ifd,ofd,&offset,(size_t)(isz-offset)) >= 0); in webdav_fcopyfile_sz()
2279 && sendfile(ifd, ofd, &offset, in webdav_fcopyfile_sz()
2289 if (0 != lseek(ofd, 0, SEEK_SET)) return -1; in webdav_fcopyfile_sz()
2304 wr = write(ofd, buf+off, (size_t)(rd-off)); in webdav_fcopyfile_sz()
2316 return ftruncate(ofd, isz); in webdav_fcopyfile_sz()
2755 const int ofd = fdevent_open_cloexec(tmpb->ptr, 0, in webdav_copytmp_rename() local
2758 if (ofd < 0) { in webdav_copytmp_rename()
2780 wr = copy_file_range(ifd, &ioff, ofd, &ooff, (size_t)ilen, 0); in webdav_copytmp_rename()
2782 wr = copy_file_range(ifd, &ioff, ofd, &ooff, in webdav_copytmp_rename()
2808 if (0 != ooff && 0 != ftruncate(ofd, 0)) { in webdav_copytmp_rename()
2819 rc = ioctl(ofd, FICLONE, ifd); in webdav_copytmp_rename()
2837 rc = webdav_fcopyfile_sz(ifd, ofd, st.st_size); in webdav_copytmp_rename()
2848 *flags = ofd; in webdav_copytmp_rename()
2852 const int wc = close(ofd); in webdav_copytmp_rename()