Date: Sun, 21 Jun 2009 15:36:11 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r194587 - stable/7/bin/cp Message-ID: <200906211536.n5LFaBsc010527@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Sun Jun 21 15:36:10 2009 New Revision: 194587 URL: http://svn.freebsd.org/changeset/base/194587 Log: MFC r193086: 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) (implicit) Modified: stable/7/bin/cp/ (props changed) stable/7/bin/cp/utils.c Modified: stable/7/bin/cp/utils.c ============================================================================== --- stable/7/bin/cp/utils.c Sun Jun 21 13:41:32 2009 (r194586) +++ stable/7/bin/cp/utils.c Sun Jun 21 15:36:10 2009 (r194587) @@ -339,7 +339,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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906211536.n5LFaBsc010527>