Home
last modified time | relevance | path

Searched refs:from_fd (Results 1 – 6 of 6) sorted by relevance

/openbsd/src/bin/cp/
Dutils.c60 int from_fd, rcount, rval, to_fd, wcount; in copy_file() local
77 if ((from_fd = open(entp->fts_path, O_RDONLY)) == -1) { in copy_file()
100 (void)close(from_fd); in copy_file()
110 (void)close(from_fd); in copy_file()
125 MAP_FILE|MAP_SHARED, from_fd, (off_t)0)) == MAP_FAILED) { in copy_file()
147 while ((rcount = read(from_fd, buf, buflen)) > 0) { in copy_file()
167 (void)close(from_fd); in copy_file()
191 (void)close(from_fd); in copy_file()
/openbsd/src/bin/mv/
Dmv.c267 int nread, from_fd, to_fd; in fastcopy() local
279 if ((from_fd = open(from, O_RDONLY)) == -1) { in fastcopy()
285 (void)close(from_fd); in fastcopy()
295 while ((nread = read(from_fd, bp, blen)) > 0) in fastcopy()
304 (void)close(from_fd); in fastcopy()
308 (void)close(from_fd); in fastcopy()
Dcp.c397 int ch, checkch, from_fd, rcount, rval, to_fd, wcount; in copy_file() local
414 if ((from_fd = open(entp->fts_path, O_RDONLY)) == -1) { in copy_file()
443 (void)close(from_fd); in copy_file()
454 (void)close(from_fd); in copy_file()
469 MAP_FILE|MAP_SHARED, from_fd, (off_t)0)) == MAP_FAILED) { in copy_file()
491 while ((rcount = read(from_fd, buf, buflen)) > 0) { in copy_file()
511 (void)close(from_fd); in copy_file()
518 (void)close(from_fd); in copy_file()
/openbsd/src/usr.bin/xinstall/
Dxinstall.c223 int devnull, from_fd, to_fd, serrno, files_match = 0; in install() local
260 if ((from_fd = open(from_name, O_RDONLY)) == -1) in install()
269 copy(from_fd, from_name, to_fd, tempfile, from_sb.st_size, in install()
366 (void)close(from_fd); in install()
402 copy(int from_fd, char *from_name, int to_fd, char *to_name, off_t size, in copy() argument
413 if (lseek(from_fd, (off_t)0, SEEK_SET) == (off_t)-1) in copy()
427 from_fd, (off_t)0)) == MAP_FAILED) { in copy()
455 while ((nr = read(from_fd, buf, sizeof(buf))) > 0) { in copy()
482 compare(int from_fd, const char *from_name, off_t from_len, int to_fd, in compare() argument
507 from_fd, from_off)) == MAP_FAILED) in compare()
/openbsd/src/usr.sbin/pwd_mkdb/
Dpwd_mkdb.c387 int from_fd, rcount, to_fd, wcount; in cp() local
389 if ((from_fd = open(from, O_RDONLY)) == -1) in cp()
393 while ((rcount = read(from_fd, buf, sizeof buf)) > 0) { in cp()
401 close(from_fd); in cp()
/openbsd/src/gnu/llvm/libcxx/src/filesystem/
Doperations.cpp903 FileDescriptor from_fd = FileDescriptor::create_with_status( in __copy_file() local
908 auto from_st = from_fd.get_status(); in __copy_file()
909 StatT const& from_stat = from_fd.get_stat(); in __copy_file()
978 if (!copy_file_impl(from_fd, to_fd, m_ec)) { in __copy_file()