Lines Matching refs:source

117 static avl_tree_t	*stree = NULL;	/* source file inode search tree */
332 * If there is more than a source and target,
392 lnkfil(char *source, char *target)
407 len = strlen(target) + strlen(dname(source)) + 4;
411 "to %s %s\n"), cmd, cmd, source);
415 target, dname(source));
458 * Create a symbolic link to the source.
461 if (symlink(source, target) < 0) {
475 switch (chkfiles(source, &target)) {
482 * Make sure source file is not a directory,
488 gettext("%s: %s is a directory\n"), cmd, source);
496 if (link(source, target) < 0) {
518 cpymve(char *source, char *target)
528 switch (chkfiles(source, &target)) {
535 * If it's a recursive copy and source
563 cmd, source);
565 Perror(source);
571 rc = copydir(source, target);
583 Perror(source);
601 if (rename(source, target) >= 0)
607 cmd, source);
612 cmd, source, target);
618 * cannot move a non-directory (source) onto an existing
626 " %s \n"), cmd, source, target);
644 if ((n = copydir(source, target)) == 0)
645 (void) rmdir(source);
653 "across file systems\n"), cmd, source);
661 "across file systems\n"), cmd, source);
683 if ((m = readlink(source, symln,
685 Perror(source);
749 * If the source file is a symlink, and either
751 * source file is not a command line argument)
761 m = readlink(source, symln, sizeof (symln) - 1);
764 Perror(source);
773 * with the source file, and return to
796 fi = open(source, O_RDONLY);
800 cmd, source);
830 * Set target's permissions to the source
832 * copied file will have the source's
864 cmd, source);
871 cmd, source, target);
875 if (writefile(fi, fo, source, target, NULL,
888 attret = copyattributes(source, target);
893 " %s\n"), cmd, source);
897 sattret = copy_sysattr(source, target);
944 source, (s1.st_mode & S_IFMT));
948 if (unlink(source) < 0) {
952 cmd, source);
992 chkfiles(char *source, char **to)
1001 * Make sure source file exists.
1003 if ((*statf)(source, &s1) < 0) {
1010 (void) fprintf(stderr, "%s: %s: %s\n", cmd, source,
1014 gettext("%s: cannot access %s\n"), cmd, source);
1026 if ((error = acl_get(source, ACL_NO_TRIVIAL, &s1acl)) != 0) {
1028 "%s: failed to get acl entries: %s\n", source,
1053 len = strlen(target) + strlen(dname(source)) + 4;
1057 "%s %s\n "), cmd, cmd, source);
1061 target, dname(source));
1073 * source and target are the same file.
1077 * error when the source and target are
1084 cmd, source, target);
1092 * For ln, it is an error if the source and
1097 if (!chk_different(source, target)) {
1189 * check whether source and target are different
1194 chk_different(char *source, char *target)
1203 if ((getrealpath(source, rsource) == 0) ||
1210 cmd, source, target);
1250 * Save s1 (stat information for source dir) so that
1466 copydir(char *source, char *target)
1480 gettext("%s: %s: is a directory\n"), cmd, source);
1503 * Save s1 (stat information for source dir) and acl info,
1531 ret = rcopy(source, target);
1572 attret = copyattributes(source, target);
1576 " %s\n"), cmd, source);
1585 sattret = copy_sysattr(source, target);
1590 "of directory %s\n"), cmd, source);
1632 copyattributes(char *source, char *target)
1644 if (pathconf(source, _PC_XATTR_EXISTS) != 1)
1657 if (open_source(source) != 0)
1659 if (open_target_srctarg_attrdirs(source, target) != 0)
1661 if (open_attrdirp(source) != 0)
1713 source, acl_strerror(aclerror));
1736 if ((ret = traverse_attrfile(dp, source, target, 1)) == -1)
1751 source, acl_strerror(aclerror));
1774 if (writefile(srcattrfd, targattrfd, source, target,
1868 /* Copy extended system attributes from source to target */
1871 copy_sysattr(char *source, char *target)
1878 if (sysattr_support(source, _PC_SATTR_EXISTS) != 1)
1881 if (open_source(source) != 0)
1886 * source file to copy to the target. The target has
1890 response = sysattr_list(cmd, srcfd, source);
1908 if (open_target_srctarg_attrdirs(source,
1913 if (open_attrdirp(source) != 0) {
1924 if ((ret = traverse_attrfile(dp, source, target,
1953 dp->d_name, source, target);
1965 /* Copy source file non default extended system attributes to target */
1971 "%s to %s\n"), cmd, source, target);
1979 /* Open the source file */
2006 /* Open source attribute dir, target and target attribute dir. */
2081 open_attrdirp(char *source)
2101 " file descriptor for %s: "), cmd, source);
2115 " directory for %s: "), cmd, source);
2128 traverse_attrfile(struct dirent *dp, char *source, char *target, int first)
2146 " file %s: "), cmd, dp->d_name, source);
2158 " %s: "), cmd, dp->d_name, source);