Alain Williams <[EMAIL PROTECTED]> wrote:
...
> Please find appended the patch against 4.5.11, there is now also a patch for
> coreutils.texi.

Thank you for the patch.  However, such functionality should be
attached to the existing preserve_ownership and preserve_mode members,
and they should be controlled by an option just like cp's existing
`--no-preserve=ATTR_LIST'.

Implementing the above will be a little tricky, since the member
values will no longer be strictly boolean.  There will be a default
value (e.g., for mv, preserve_ownership would be DEFAULT_TRUE,
for cp it'd be DEFAULT_FALSE), and the individual application would
set that to SPECIFIED_TRUE or SPECIFIED_FALSE, if --preserve=owner
or --no-preserve=owner (resp.) is specified.  Then each use of the
`preserve_mode' member would have to account for the fact that it is
no longer a boolean variable.

I plan do the above after the upcoming release of coreutils-5.0.

Note that with your patch, when cp and install call `copy',
they can end up using the new members uninitialized.

I've just added this comment to copy.h:

Index: copy.h
===================================================================
RCS file: /fetish/cu/src/copy.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -p -u -r1.26 -r1.27
--- copy.h      4 Jan 2003 10:33:01 -0000       1.26
+++ copy.h      26 Mar 2003 18:47:49 -0000      1.27
@@ -54,6 +54,10 @@ enum Dereference_symlink
    || (Mode) == SPARSE_AUTO            \
    || (Mode) == SPARSE_ALWAYS)
 
+/* These options control how files are copied by at least the
+   following programs: mv (when rename doesn't work), cp, install.
+   So, if you add a new member, be sure to initialize it in
+   mv.c, cp.c, and install.c.  */
 struct cp_options
 {
   enum backup_type backup_type;


_______________________________________________
Bug-fileutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-fileutils

Reply via email to