Home
last modified time | relevance | path

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

/freebsd/usr.bin/xinstall/
H A Dxinstall.c807 int temp_fd, to_fd; in install() local
814 to_fd = -1; in install()
854 if ((to_fd = open(to_name, O_RDONLY, 0)) < 0) in install()
860 (size_t)from_sb.st_size, to_fd, in install()
865 (void)close(to_fd); in install()
869 to_fd = create_tempfile(to_name, tempfile, in install()
871 if (to_fd < 0) in install()
875 stripped = strip(tempfile, to_fd, from_name, in install()
879 digestresult = copy(from_fd, from_name, to_fd, in install()
887 (void)strip(tempfile, to_fd, NULL, &digestresult); in install()
[all …]
/freebsd/bin/mv/
H A Dmv.c263 int from_fd, to_fd; in fastcopy() local
275 while ((to_fd = in fastcopy()
284 if (write(to_fd, bp, (size_t)nread) != nread) { in fastcopy()
293 (void)close(to_fd); in fastcopy()
298 if (fchown(to_fd, sbp->st_uid, sbp->st_gid)) { in fastcopy()
308 if (fchmod(to_fd, sbp->st_mode)) in fastcopy()
315 preserve_fd_acls(from_fd, to_fd, from, to); in fastcopy()
320 if (futimens(to_fd, ts)) in fastcopy()
330 if (fstat(to_fd, &tsb) == 0) { in fastcopy()
333 if (fchflags(to_fd, in fastcopy()
[all …]
/freebsd/usr.sbin/config/
H A Dmain.cc589 int from_fd, to_fd; in moveifchanged() local
598 if ((to_fd = open(to_path, O_RDONLY)) < 0) in moveifchanged()
604 if (!changed && fstat(to_fd, &to_sb) < 0) in moveifchanged()
617 q = (char *)mmap(NULL, tsize, PROT_READ, MAP_SHARED, to_fd, in moveifchanged()
636 if (to_fd >= 0) in moveifchanged()
637 close(to_fd); in moveifchanged()
/freebsd/contrib/nvi/ex/
H A Dtag.h27 int to_fd; /* to cscope: file descriptor. */ member
H A Dex_cscope.c443 csc->to_fd = to_cs[1]; in run_cscope()
/freebsd/usr.sbin/pwd_mkdb/
H A Dpwd_mkdb.c577 int from_fd, rcount, to_fd, wcount; in cp() local
581 if ((to_fd = open(to, O_WRONLY|O_CREAT|O_EXCL, mode)) < 0) in cp()
584 wcount = write(to_fd, buf, rcount); in cp()
/freebsd/usr.sbin/nfsd/
H A Dnfsd.c1154 copy_stable(int from_fd, int to_fd) in copy_stable() argument
1161 ret = lseek(to_fd, (off_t)0, SEEK_SET); in copy_stable()
1163 ret = ftruncate(to_fd, (off_t)0); in copy_stable()
1168 ret = write(to_fd, buf, cnt); in copy_stable()
1173 ret = fsync(to_fd); in copy_stable()
/freebsd/contrib/llvm-project/libcxx/src/filesystem/
H A Doperations.cpp317 …FileDescriptor to_fd = FileDescriptor::create_with_status(&to, m_ec, to_open_flags, from_stat.st_m… in __copy_file() local
325 if (!detail::stat_equivalent(to_stat_path, to_fd.get_stat())) in __copy_file()
329 if (detail::posix_fchmod(to_fd, from_stat, m_ec)) in __copy_file()
331 if (detail::posix_ftruncate(to_fd, 0, m_ec)) in __copy_file()
335 if (!detail::copy_file_impl(from_fd, to_fd, m_ec)) { in __copy_file()