Lines Matching refs:dst_name
121 static bool copy_internal (char const *src_name, char const *dst_name,
315 char const *src_name, char const *dst_name, in sparse_copy() argument
372 quoteaf_n (0, src_name), quoteaf_n (1, dst_name)); in sparse_copy()
431 quoteaf (dst_name)); in sparse_copy()
437 if (! create_hole (dest_fd, dst_name, punch_holes, psize)) in sparse_copy()
478 if (make_hole && ! create_hole (dest_fd, dst_name, punch_holes, psize)) in sparse_copy()
549 char const *src_name, char const *dst_name) in lseek_copy() argument
594 if (! create_hole (dest_fd, dst_name, in lseek_copy()
608 quotef (dst_name)); in lseek_copy()
625 true, allow_reflink, src_name, dst_name, in lseek_copy()
657 error (0, errno, _("failed to extend %s"), quoteaf (dst_name)); in lseek_copy()
664 error (0, errno, _("error deallocating %s"), quoteaf (dst_name)); in lseek_copy()
849 char *dst_name = file_name_concat (dst_name_in, namep, nullptr); in copy_dir() local
853 ok &= copy_internal (src_name, dst_name, dst_dirfd, in copy_dir()
854 dst_name + (dst_relname_in - dst_name_in), in copy_dir()
861 free (dst_name); in copy_dir()
920 set_owner (const struct cp_options *x, char const *dst_name, in set_owner() argument
944 && qset_acl (dst_name, dest_desc, restrictive_temp_mode) != 0) in set_owner()
948 quoteaf (dst_name)); in set_owner()
965 quoteaf (dst_name)); in set_owner()
979 set_author (char const *dst_name, int dest_desc, const struct stat *src_sb) in set_author() argument
987 ? file_name_lookup (dst_name, 0, 0) in set_author()
990 error (0, errno, _("failed to lookup file %s"), quoteaf (dst_name)); in set_author()
996 quoteaf (dst_name)); in set_author()
1000 (void) dst_name; in set_author()
1016 set_process_security_ctx (char const *src_name, char const *dst_name, in set_process_security_ctx() argument
1058 if (new_dst && defaultcon (x->set_security_context, dst_name, mode) < 0 in set_process_security_ctx()
1063 quoteaf (dst_name)); in set_process_security_ctx()
1078 set_file_security_ctx (char const *dst_name, in set_file_security_ctx() argument
1085 if (! restorecon (x->set_security_context, dst_name, recurse)) in set_file_security_ctx()
1089 quoteaf_n (0, dst_name)); in set_file_security_ctx()
1179 char const *src_name, char const *dst_name, in handle_clone_fail() argument
1191 quoteaf_n (0, dst_name), quoteaf_n (1, src_name)); in handle_clone_fail()
1199 error (0, errno, _("cannot remove %s"), quoteaf (dst_name)); in handle_clone_fail()
1228 copy_reg (char const *src_name, char const *dst_name, in copy_reg() argument
1301 if (! set_file_security_ctx (dst_name, false, x)) in copy_reg()
1317 printf (_("removed %s\n"), quoteaf (dst_name)); in copy_reg()
1321 error (0, errno, _("cannot remove %s"), quoteaf (dst_name)); in copy_reg()
1335 if (! set_process_security_ctx (src_name, dst_name, dst_mode, in copy_reg()
1405 quoteaf (dst_name)); in copy_reg()
1426 dst_name, in copy_reg()
1481 quoteaf (dst_name)); in copy_reg()
1491 && *dst_name && dst_name[strlen (dst_name) - 1] == '/') in copy_reg()
1502 quoteaf (dst_name)); in copy_reg()
1517 if (! handle_clone_fail (dst_dirfd, dst_relname, src_name, dst_name, in copy_reg()
1530 error (0, errno, _("cannot fstat %s"), quoteaf (dst_name)); in copy_reg()
1602 src_name, dst_name) in copy_reg()
1609 src_name, dst_name, UINTMAX_MAX, &n_read, in copy_reg()
1617 error (0, errno, _("failed to extend %s"), quoteaf (dst_name)); in copy_reg()
1631 error (0, errno, _("preserving times for %s"), quoteaf (dst_name)); in copy_reg()
1644 switch (set_owner (x, dst_name, dst_dirfd, dst_relname, dest_desc, in copy_reg()
1659 if (!copy_attr (src_name, source_desc, dst_name, dest_desc, x) in copy_reg()
1664 set_author (dst_name, dest_desc, src_sb); in copy_reg()
1671 if (copy_acl (src_name, source_desc, dst_name, dest_desc, src_mode) != 0 in copy_reg()
1677 if (set_acl (dst_name, dest_desc, x->mode) != 0) in copy_reg()
1682 if (set_acl (dst_name, dest_desc, MODE_RW_UGO & ~cached_umask ()) != 0) in copy_reg()
1694 quoteaf (dst_name)); in copy_reg()
1706 error (0, errno, _("failed to close %s"), quoteaf (dst_name)); in copy_reg()
1985 overwrite_ok (struct cp_options const *x, char const *dst_name, in overwrite_ok() argument
1999 program_name, quoteaf (dst_name), in overwrite_ok()
2006 program_name, quoteaf (dst_name)); in overwrite_ok()
2060 char const *dst_name, in abandon_move() argument
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
2131 src_name = a_src_name = subst_suffix (dst_name, dst_relname, in create_hard_link()
2134 quoteaf_n (0, dst_name), quoteaf_n (1, src_name)); in create_hard_link()
2139 printf (_("removed %s\n"), quoteaf (dst_name)); in create_hard_link()
2194 copy_internal (char const *src_name, char const *dst_name, in copy_internal() argument
2237 char const *name = rename_errno == 0 ? dst_name : src_name; in copy_internal()
2337 error (0, errno, _("cannot stat %s"), quoteaf (dst_name)); in copy_internal()
2353 quoteaf_n (0, src_name), quoteaf_n (1, dst_name)); 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()
2442 error (0, 0, _("not replacing %s"), quoteaf (dst_name)); in copy_internal()
2444 printf (_("skipped %s\n"), quoteaf (dst_name)); in copy_internal()
2465 quoteaf_n (0, dst_name), quoteaf_n (1, src_name)); in copy_internal()
2483 quoteaf_n (0, dst_name), quoteaf_n (1, src_name)); in copy_internal()
2501 quoteaf (dst_name)); in copy_internal()
2515 quotef_n (0, src_name), quotef_n (0, dst_name)); in copy_internal()
2545 quoteaf_n (0, dst_name), in copy_internal()
2560 idx_t dirlen = dst_relname - dst_name; in copy_internal()
2563 memcpy (mempcpy (dst_backup, dst_name, dirlen), in copy_internal()
2569 error (0, errno, _("cannot backup %s"), quoteaf (dst_name)); in copy_internal()
2586 error (0, errno, _("cannot remove %s"), quoteaf (dst_name)); in copy_internal()
2591 printf (_("removed %s\n"), quoteaf (dst_name)); in copy_internal()
2618 quoteaf_n (0, src_name), quoteaf_n (1, dst_name)); in copy_internal()
2628 emit_verbose (src_name, dst_name, dst_backup); in copy_internal()
2734 char *earlier = subst_suffix (dst_name, dst_relname, in copy_internal()
2737 quoteaf_n (0, dst_name), quoteaf_n (1, earlier)); in copy_internal()
2745 dst_name, dst_dirfd, dst_relname, in copy_internal()
2764 emit_verbose (src_name, dst_name, dst_backup); in copy_internal()
2770 (void) set_file_security_ctx (dst_name, true, x); in copy_internal()
2843 char const *quoted_dst_name = quoteaf_n (1, dst_name); in copy_internal()
2880 quoteaf_n (0, src_name), quoteaf_n (1, dst_name)); in copy_internal()
2888 emit_verbose (src_name, dst_name, dst_backup); in copy_internal()
2910 if (! set_process_security_ctx (src_name, dst_name, src_mode, new_dst, x)) in copy_internal()
2946 quoteaf (dst_name)); in copy_internal()
2956 error (0, errno, _("cannot stat %s"), quoteaf (dst_name)); in copy_internal()
2969 quoteaf (dst_name)); in copy_internal()
2987 printf (_("created directory %s\n"), quoteaf (dst_name)); in copy_internal()
2989 emit_verbose (src_name, dst_name, nullptr); in copy_internal()
3000 if (! set_file_security_ctx (dst_name, false, x)) in copy_internal()
3019 delayed_ok = copy_dir (src_name, dst_name, dst_dirfd, dst_relname, in copy_internal()
3052 quotef (dst_name)); in copy_internal()
3062 quoteaf_n (0, dst_name), quoteaf_n (1, src_name)); 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()
3119 error (0, errno, _("cannot create fifo %s"), quoteaf (dst_name)); in copy_internal()
3129 quoteaf (dst_name)); in copy_internal()
3166 quoteaf (dst_name)); in copy_internal()
3184 dst_name); in copy_internal()
3208 if (! set_file_security_ctx (dst_name, false, x)) in copy_internal()
3255 error (0, errno, _("preserving times for %s"), quoteaf (dst_name)); in copy_internal()
3265 switch (set_owner (x, dst_name, dst_dirfd, drelname, -1, in copy_internal()
3278 if (x->preserve_xattr && ! copy_attr (src_name, -1, dst_name, -1, x) in copy_internal()
3286 set_author (dst_name, -1, &src_sb); in copy_internal()
3290 if (copy_acl (src_name, -1, dst_name, -1, src_mode) != 0 in copy_internal()
3296 if (set_acl (dst_name, -1, x->mode) != 0) in copy_internal()
3303 if (set_acl (dst_name, -1, default_permissions & ~cached_umask ()) != 0) in copy_internal()
3324 error (0, errno, _("cannot stat %s"), quoteaf (dst_name)); in copy_internal()
3339 quoteaf (dst_name)); in copy_internal()
3364 char const *dst_relbackup = &dst_backup[dst_relname - dst_name]; in copy_internal()
3366 error (0, errno, _("cannot un-backup %s"), quoteaf (dst_name)); in copy_internal()
3371 quoteaf_n (0, dst_backup), quoteaf_n (1, dst_name)); in copy_internal()
3401 copy (char const *src_name, char const *dst_name, in copy() argument
3416 top_level_dst_name = dst_name; in copy()
3419 return copy_internal (src_name, dst_name, dst_dirfd, dst_relname, in copy()