]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Support for install:
authorJim Meyering <jim@meyering.net>
Sun, 10 May 1998 12:17:46 +0000 (12:17 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 10 May 1998 12:17:46 +0000 (12:17 +0000)
[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.

src/copy.h

index dd920d9d7fafc90bcbc660f724c3dc0bda6e9b19..76f6c931af82f39e1e04102bcb674ddcc3907dd7 100644 (file)
@@ -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;