Lines Matching refs:dst_dirfd

122                            int dst_dirfd, char const *dst_relname,
818 int dst_dirfd, char const *dst_relname_in, bool new_dst, in copy_dir() argument
853 ok &= copy_internal (src_name, dst_name, dst_dirfd, in copy_dir()
921 int dst_dirfd, char const *dst_relname, int dest_desc, in set_owner() argument
953 if (fchown_or_lchown (dest_desc, dst_dirfd, dst_relname, uid, gid) == 0) in set_owner()
960 ignore_value (fchown_or_lchown (dest_desc, dst_dirfd, dst_relname, in set_owner()
1178 handle_clone_fail (int dst_dirfd, char const *dst_relname, in handle_clone_fail() argument
1198 && unlinkat (dst_dirfd, dst_relname, 0) != 0 && errno != ENOENT) in handle_clone_fail()
1229 int dst_dirfd, char const *dst_relname, in copy_reg() argument
1288 dest_desc = openat (dst_dirfd, dst_relname, open_flags); in copy_reg()
1314 if (unlinkat (dst_dirfd, dst_relname, 0) == 0) in copy_reg()
1381 int s = fclonefileat (source_desc, dst_dirfd, dst_relname, in copy_reg()
1386 s = fclonefileat (source_desc, dst_dirfd, dst_relname, in copy_reg()
1400 if (utimensat (dst_dirfd, dst_relname, timespec, in copy_reg()
1425 if (! handle_clone_fail (dst_dirfd, dst_relname, src_name, in copy_reg()
1453 dest_desc = openat (dst_dirfd, dst_relname, open_flags | O_EXCL, in copy_reg()
1470 if (0 <= readlinkat (dst_dirfd, dst_relname, dummy, sizeof dummy)) in copy_reg()
1474 dest_desc = openat (dst_dirfd, dst_relname, in copy_reg()
1517 if (! handle_clone_fail (dst_dirfd, dst_relname, src_name, dst_name, in copy_reg()
1540 && (fchmod_or_lchmod (dest_desc, dst_dirfd, dst_relname, temporary_mode) in copy_reg()
1629 if (fdutimensat (dest_desc, dst_dirfd, dst_relname, timespec, 0) != 0) in copy_reg()
1644 switch (set_owner (x, dst_name, dst_dirfd, dst_relname, dest_desc, in copy_reg()
1689 && (fchmod_or_lchmod (dest_desc, dst_dirfd, dst_relname, in copy_reg()
1737 int dst_dirfd, char const *dst_relname, struct stat const *dst_sb, in same_file_ok() argument
1770 bool sn = same_nameat (AT_FDCWD, src_name, dst_dirfd, dst_relname); in same_file_ok()
1799 if (fstatat (dst_dirfd, dst_relname, &tmp_dst_sb, in same_file_ok()
1854 return ! same_nameat (AT_FDCWD, src_name, dst_dirfd, dst_relname); in same_file_ok()
1887 && ! same_nameat (AT_FDCWD, src_name, dst_dirfd, dst_relname)) in same_file_ok()
1934 dst_dirfd, dst_relname); in same_file_ok()
1953 else if (fstatat (dst_dirfd, dst_relname, &tmp_dst_sb, 0) != 0) in same_file_ok()
1977 writable_destination (int dst_dirfd, char const *dst_relname, mode_t mode) in writable_destination() argument
1981 || faccessat (dst_dirfd, dst_relname, W_OK, AT_EACCESS) == 0); in writable_destination()
1986 int dst_dirfd, char const *dst_relname, in overwrite_ok() argument
1989 if (! writable_destination (dst_dirfd, dst_relname, dst_sb->st_mode)) in overwrite_ok()
2061 int dst_dirfd, char const *dst_relname, in abandon_move() argument
2070 && ! writable_destination (dst_dirfd, dst_relname, in abandon_move()
2072 && ! overwrite_ok (x, dst_name, dst_dirfd, dst_relname, dst_sb))); in abandon_move()
2120 char const *dst_name, int dst_dirfd, char const *dst_relname, in create_hard_link() argument
2123 int err = force_linkat (src_dirfd, src_relname, dst_dirfd, dst_relname, in create_hard_link()
2159 int dst_dirfd, char const *dst_relname) in source_is_dst_backup() argument
2173 int dst_back_status = fstatat (dst_dirfd, dst_back, &dst_back_sb, 0); in source_is_dst_backup()
2195 int dst_dirfd, char const *dst_relname, in copy_internal() argument
2226 rename_errno = (renameatu (AT_FDCWD, src_name, dst_dirfd, drelname, in copy_internal()
2238 int dirfd = rename_errno == 0 ? dst_dirfd : AT_FDCWD; in copy_internal()
2321 else if (0 <= follow_fstatat (dst_dirfd, drelname, &dst_sb, in copy_internal()
2349 && ! same_file_ok (src_name, &src_sb, dst_dirfd, drelname, in copy_internal()
2369 if (0 <= utimecmpat (dst_dirfd, dst_relname, &dst_sb, in copy_internal()
2390 if (! create_hard_link (nullptr, dst_dirfd, earlier_file, in copy_internal()
2391 dst_name, dst_dirfd, dst_relname, in copy_internal()
2413 if (abandon_move (x, dst_name, dst_dirfd, drelname, &dst_sb)) in copy_internal()
2430 && ! overwrite_ok (x, dst_name, dst_dirfd, in copy_internal()
2538 dst_dirfd, dst_relname)) in copy_internal()
2550 char *tmp_backup = backup_file_rename (dst_dirfd, dst_relname, in copy_internal()
2584 if (unlinkat (dst_dirfd, dst_relname, 0) != 0 && errno != ENOENT) in copy_internal()
2608 : fstatat (dst_dirfd, drelname, &tmp_buf, AT_SYMLINK_NOFOLLOW) < 0 in copy_internal()
2697 if (same_nameat (AT_FDCWD, src_name, dst_dirfd, earlier_file)) in copy_internal()
2705 else if (same_nameat (dst_dirfd, dst_relname, in copy_internal()
2706 dst_dirfd, earlier_file)) in copy_internal()
2744 if (! create_hard_link (nullptr, dst_dirfd, earlier_file, in copy_internal()
2745 dst_name, dst_dirfd, dst_relname, in copy_internal()
2756 rename_errno = (renameat (AT_FDCWD, src_name, dst_dirfd, drelname) == 0 in copy_internal()
2873 if ((unlinkat (dst_dirfd, drelname, in copy_internal()
2943 if (mkdirat (dst_dirfd, drelname, mode) != 0) in copy_internal()
2954 if (fstatat (dst_dirfd, drelname, &dst_sb, AT_SYMLINK_NOFOLLOW) != 0) in copy_internal()
2966 if (lchmodat (dst_dirfd, drelname, dst_mode | S_IRWXU) != 0) in copy_internal()
3019 delayed_ok = copy_dir (src_name, dst_name, dst_dirfd, dst_relname, in copy_internal()
3038 in_current_dir = ((dst_dirfd == AT_FDCWD && STREQ (".", dst_parent)) in copy_internal()
3043 || (fstatat (dst_dirfd, dst_parent, &dst_parent_sb, in copy_internal()
3057 int err = force_symlinkat (src_name, dst_dirfd, dst_relname, in copy_internal()
3087 dst_name, dst_dirfd, dst_relname, in copy_internal()
3104 if (! copy_reg (src_name, dst_name, dst_dirfd, dst_relname, in copy_internal()
3116 if (mknodat (dst_dirfd, dst_relname, mode, 0) != 0) in copy_internal()
3117 if (mkfifoat (dst_dirfd, dst_relname, mode & ~S_IFIFO) != 0) in copy_internal()
3126 if (mknodat (dst_dirfd, dst_relname, mode, src_sb.st_rdev) != 0) in copy_internal()
3144 int symlink_err = force_symlinkat (src_link_val, dst_dirfd, dst_relname, in copy_internal()
3154 areadlinkat_with_size (dst_dirfd, dst_relname, dst_sb.st_size); in copy_internal()
3178 && (lchownat (dst_dirfd, dst_relname, in copy_internal()
3220 if (fstatat (dst_dirfd, drelname, &sb, AT_SYMLINK_NOFOLLOW) == 0) in copy_internal()
3253 if (utimensat (dst_dirfd, drelname, timespec, utimensat_flags) != 0) in copy_internal()
3265 switch (set_owner (x, dst_name, dst_dirfd, drelname, -1, in copy_internal()
3320 if (new_dst && (fstatat (dst_dirfd, drelname, &dst_sb, in copy_internal()
3335 if (lchmodat (dst_dirfd, drelname, dst_mode | omitted_permissions) in copy_internal()
3365 if (renameat (dst_dirfd, dst_relbackup, dst_dirfd, drelname) != 0) in copy_internal()
3402 int dst_dirfd, char const *dst_relname, in copy() argument
3419 return copy_internal (src_name, dst_name, dst_dirfd, dst_relname, in copy()