Hello,
I have found a slight bug in coreutils 4.5.3's `cp' command,
which will not recognize multiple arguments for one `--preserve'
option.
% ./cp --version
cp (coreutils) 4.5.3
[...]
% echo hello >file1
% ./cp --preserve=mode,timestamps file1 file2
./cp: ambiguous argument `' for `--preserve'
Valid arguments are:
- `mode'
- `timestamps'
- `ownership'
- `links'
- `all'
Try `./cp --help' for more information.
%
The following patch will correct this problem.
2002-12-11 TAKAI Kousuke <address@hidden>
* src/cp.c (decode_preserve_arg): Advance `comma' to
point the character next to the comma.
--- coreutils-4.5.3/src/cp.c.orig 2002-08-31 17:52:10.000000000 +0900
+++ coreutils-4.5.3/src/cp.c 2002-12-11 19:13:09.919213918 +0900
@@ -787,7 +787,7 @@ decode_preserve_arg (char const *arg, st
/* put a NUL in its place */
if (comma)
- *comma = 0;
+ *comma++ = 0;
/* process S. */
val = XARGMATCH ("--preserve", s, preserve_args, preserve_vals);
[patch ends here]
Sorry for my poor English.
--
TAKAI Kousuke <address@hidden>
Dept. of Communications and Computer Engineering,
Graduate School of Infomatics, Kyoto University, Japan