Home
last modified time | relevance | path

Searched refs:to_fd (Results 1 – 8 of 8) sorted by relevance

/netbsd-src/bin/cp/
H A Dutils.c103 int ch, checkch, from_fd, rcount, rval, to_fd, tolnk, wcount; in copy_file() local
122 to_fd = -1; in copy_file()
158 to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); in copy_file()
160 to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, in copy_file()
163 if (to_fd == -1 && (fflag || tolnk)) { in copy_file()
169 to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, in copy_file()
173 if (to_fd == -1) { in copy_file()
221 if (write(to_fd, &p[fsize - remainder], in copy_file()
242 wcount = write(to_fd, buf, (size_t)rcount); in copy_file()
258 if (pflag && (fcpxattr(from_fd, to_fd) != 0)) in copy_file()
[all …]
/netbsd-src/bin/mv/
H A Dmv.c278 int from_fd, to_fd; in fastcopy() local
286 if ((to_fd = in fastcopy()
296 (void)close(to_fd); in fastcopy()
300 if (write(to_fd, bp, nread) != nread) { in fastcopy()
319 (void)close(to_fd); in fastcopy()
323 if (fcpxattr(from_fd, to_fd) == -1) in fastcopy()
345 if (futimens(to_fd, ts)) in fastcopy()
347 if (futimes(to_fd, tval)) in fastcopy()
351 if (fchown(to_fd, sbp->st_uid, sbp->st_gid)) { in fastcopy()
356 if (fchmod(to_fd, sbp->st_mode)) in fastcopy()
[all …]
/netbsd-src/usr.bin/xinstall/
H A Dxinstall.c672 int devnull, from_fd, to_fd, serrno, tmpmode; in install() local
742 if ((to_fd = mkstemp(to_name)) == -1) in install()
745 if ((to_fd = open(to_name, in install()
756 copy(from_fd, from_name, to_fd, to_name, from_sb.st_size); in install()
767 close(to_fd); in install()
768 if ((to_fd = open(to_name, O_RDONLY, S_IRUSR | S_IWUSR)) < 0) in install()
774 if (fstat(to_fd, &to_sb) != 0) in install()
778 copy(to_fd, to_name, -1, NULL, size); in install()
789 close(to_fd); in install()
790 if ((to_fd in install()
860 copy(int from_fd,char * from_name,int to_fd,char * to_name,off_t size) copy() argument
[all...]
/netbsd-src/lib/libc/gen/
H A Dextattr.c100 extattr_copy_fd(int from_fd, int to_fd, int namespace) in extattr_copy_fd() argument
156 if (extattr_set_fd(to_fd, namespace, aname, in extattr_copy_fd()
325 fcpxattr(int from_fd, int to_fd) in fcpxattr() argument
334 if ((error = extattr_copy_fd(from_fd, to_fd, *ns)) != 0) in fcpxattr()
/netbsd-src/usr.sbin/pwd_mkdb/
H A Dpwd_mkdb.c641 int from_fd, to_fd; in cp() local
646 if ((to_fd = open(to, O_WRONLY | O_CREAT | O_EXCL, mode)) < 0) { in cp()
651 wcount = write(to_fd, buf, (size_t)rcount); in cp()
654 (void)close(to_fd); in cp()
660 if (close(to_fd)) in cp()
/netbsd-src/external/bsd/nvi/dist/ex/
H A Dtag.h30 int to_fd; /* to cscope: file descriptor. */ member
H A Dex_cscope.c430 csc->to_fd = to_cs[1]; in run_cscope()
/netbsd-src/external/apache2/llvm/dist/libcxx/src/filesystem/
H A Doperations.cpp956 FileDescriptor to_fd = FileDescriptor::create_with_status( in __copy_file() local
965 if (!detail::stat_equivalent(to_stat_path, to_fd.get_stat())) in __copy_file()
969 if (detail::posix_fchmod(to_fd, from_stat, m_ec)) in __copy_file()
971 if (detail::posix_ftruncate(to_fd, 0, m_ec)) in __copy_file()
975 if (!copy_file_impl(from_fd, to_fd, m_ec)) { in __copy_file()