diff options
author | Jilles Tjoelker <jilles@FreeBSD.org> | 2009-05-30 10:36:14 +0000 |
---|---|---|
committer | Jilles Tjoelker <jilles@FreeBSD.org> | 2009-05-30 10:36:14 +0000 |
commit | f2db75739c544582540c74d0db1c08a97967eca5 (patch) | |
tree | 2dfad0b05927b6d4db675e13720379396b079612 /bin | |
parent | 946a48449b87f3a125578568f7bc9ecb15e2d562 (diff) | |
download | src-f2db75739c544582540c74d0db1c08a97967eca5.tar.gz src-f2db75739c544582540c74d0db1c08a97967eca5.zip |
Preserve file flags on symlinks in cp -Rp.
This reported ENOSYS before.
PR: bin/111226 (part of)
Submitted by: Martin Kammerhofer
Approved by: ed (mentor)
MFC after: 3 weeks
Notes
Notes:
svn path=/head/; revision=193086
Diffstat (limited to 'bin')
-rw-r--r-- | bin/cp/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c index aaa12d655fc6..c27c788a3580 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -365,7 +365,7 @@ setfile(struct stat *fs, int fd) if (!gotstat || fs->st_flags != ts.st_flags) if (fdval ? fchflags(fd, fs->st_flags) : - (islink ? (errno = ENOSYS) : + (islink ? lchflags(to.p_path, fs->st_flags) : chflags(to.p_path, fs->st_flags))) { warn("chflags: %s", to.p_path); rval = 1; |