summaryrefslogtreecommitdiff
path: root/src/copy.h
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-05-10 12:17:46 +0000
committerJim Meyering <jim@meyering.net>1998-05-10 12:17:46 +0000
commita42054dd574b80f59f82068d052f255e2acf2231 (patch)
tree1540253038ef9fce8e71b569a75010b054c28683 /src/copy.h
parent24da56f9908087fdeefe8ad11195b239d81e8df6 (diff)
downloadcoreutils-a42054dd574b80f59f82068d052f255e2acf2231.tar.xz
Support for install:
[struct cp_options] (failed_unlink_is_fatal): New member. (preserve_owner_and_group): New member. (preserve_chmod_bits): New member. (preserve_timestamps): New member. (preserve): Remove member. (set_mode): New member. (mode): New member.
Diffstat (limited to 'src/copy.h')
-rw-r--r--src/copy.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/copy.h b/src/copy.h
index dd920d9d7..76f6c931a 100644
--- a/src/copy.h
+++ b/src/copy.h
@@ -41,6 +41,13 @@ struct cp_options
/* If nonzero, remove existing destination nondirectories. */
int force;
+ /* Setting this member is meaningful only if FORCE is also set.
+ If nonzero, copy returns nonzero upon failed unlink.
+ Otherwise, the failure still elicits a diagnostic, but it doesn't
+ change copy's return value. This is nonzero for cp and mv, and zero
+ for install. */
+ int failed_unlink_is_fatal;
+
/* If nonzero, create hard links instead of copying files.
Create destination directories as usual. */
int hard_link;
@@ -58,7 +65,9 @@ struct cp_options
/* If nonzero, attempt to give the copies the original files' permissions,
owner, group, and timestamps. */
- int preserve;
+ int preserve_owner_and_group;
+ int preserve_chmod_bits;
+ int preserve_timestamps;
/* If nonzero and any of the above (for preserve) file attributes cannot
be applied to a destination file, treat it as a failure and return
@@ -77,6 +86,14 @@ struct cp_options
Create destination directories as usual. */
int symbolic_link;
+ /* If nonzero, set file mode to value of MODE. Otherwise,
+ set it based on current umask modified by UMASK_KILL. */
+ int set_mode;
+
+ /* Set the mode of the destination file to exactly this value
+ if USE_MODE is nonzero. */
+ mode_t mode;
+
/* The bits to preserve in created files' modes. */
unsigned int umask_kill;