aboutsummaryrefslogtreecommitdiffstats
path: root/src/cp.c
diff options
context:
space:
mode:
authorOndřej Vašík <ovasik@redhat.com>2009-03-11 16:08:20 +0100
committerJim Meyering <meyering@redhat.com>2009-03-11 17:32:44 +0100
commitc160afe902c07f5052dbd97c726a997db7fa20c0 (patch)
tree3a63eb8e7bf75eb1d61d65a50c4c40f9e3c43847 /src/cp.c
parentmaint: Document how to best to enable gcc warnings for developers (diff)
downloadcoreutils-c160afe902c07f5052dbd97c726a997db7fa20c0.tar.gz
coreutils-c160afe902c07f5052dbd97c726a997db7fa20c0.zip
cp: make -a option preserve xattrs, but with reduced diagnostics
* copy.c (copy_attr_by_fd): Reduce xattr diagnostics for 'cp -a'. (copy_attr_by_name): Likewise. * cp.c (main): Preserve xattrs with -a option, when possible. * doc/coreutils.texi: Document that xattrs are preserved with cp -a, with no added diagnostics. * NEWS: Mention the change. * tests/misc/xattr: Add tests for 'cp --preserve=all' and 'cp -a'.
Diffstat (limited to 'src/cp.c')
-rw-r--r--src/cp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cp.c b/src/cp.c
index af4bd601b..878507616 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -925,6 +925,7 @@ main (int argc, char **argv)
x.require_preserve = true;
if (selinux_enabled)
x.preserve_security_context = true;
+ x.preserve_xattr = true;
x.reduce_diagnostics = true;
x.recursive = true;
break;