summaryrefslogtreecommitdiff
path: root/src/copy.h
diff options
context:
space:
mode:
authorOndřej Vašík <ovasik@redhat.com>2009-02-17 15:53:39 +0100
committerJim Meyering <meyering@redhat.com>2009-02-18 15:27:10 +0100
commit8c243ff965d477a89582a1b329923516a4d64668 (patch)
treeb0b9d6e5c1d4f3b9aa0134ffe327b1c9ddec4aed /src/copy.h
parent86cef85b3671ed0a14a444eef3b6cb07fa26ee64 (diff)
downloadcoreutils-8c243ff965d477a89582a1b329923516a4d64668.tar.xz
cp: -a now preserves SELinux context, with reduced diagnostics
* copy.c (copy_reg): Reduce SELinux context diagnostics for 'cp -a'. (copy_internal): Likewise * copy.h (cp_options): Add boolean reduce_diagnostics. * cp.c (usage): Say that --archive (-a) behaves like -dR --preserve=all. (cp_option_init): Initialize added reduce_diagnostics. (main): Add reduce_diagnostics for the -a option, and preserve SELinux context, if possible. * mv.c (cp_options_init): Initialize new cp_options booleans. * install.c (cp_option_init): Likewise. * NEWS: Mention those behaviour changes. * doc/coreutils.texi: Document --preserve=context, document that diagnostics are not shown for failures of non-mandatory attributes (just SELinux at the moment). * tests/cp/cp-a-selinux: Check not only failures, but succesful use of preserving SELinux context in cp.
Diffstat (limited to 'src/copy.h')
-rw-r--r--src/copy.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/copy.h b/src/copy.h
index 0cdf16be1..8e0b4080e 100644
--- a/src/copy.h
+++ b/src/copy.h
@@ -186,6 +186,12 @@ struct cp_options
this flag is "true", while with "cp --preserve=all", it is false. */
bool require_preserve_xattr;
+ /* Used as difference boolean between cp -a and cp -dR --preserve=all.
+ If true, non-mandatory failure diagnostics are not displayed. This
+ should prevent poluting cp -a output.
+ */
+ bool reduce_diagnostics;
+
/* If true, copy directories recursively and copy special files
as themselves rather than copying their contents. */
bool recursive;