Commit Graph
14506 Commits
Author SHA1 Message Date
Jim Meyering 5f69a51188 . 2000-08-20 21:16:36 +00:00
Jim Meyering fc27421c82 New file. From J. David Anglin. 2000-08-20 21:12:36 +00:00
Jim Meyering 3581b3cf77 *** empty log message *** FILEUTILS-4_0y 2000-08-20 21:04:38 +00:00
Jim Meyering 9f425a515b *** empty log message *** 2000-08-20 21:04:26 +00:00
Jim Meyering b4721f8c6e (TESTS): Add cp-HL. 2000-08-20 21:04:20 +00:00
Jim Meyering 59bf576f46 *** empty log message *** 2000-08-20 21:03:48 +00:00
Jim Meyering 1d0ba16702 *** empty log message *** 2000-08-20 21:03:03 +00:00
Jim Meyering c4c4106e8b *** empty log message *** 2000-08-20 20:50:26 +00:00
Jim Meyering d7af479281 *** empty log message *** 2000-08-20 20:49:58 +00:00
Jim Meyering 5b55669c7a (cp_option_init): Initialize to DEREF_ALWAYS, not `1'. 2000-08-20 20:49:44 +00:00
Jim Meyering 94d34806bd (cp_option_init): Initialize to DEREF_NEVER, not `0'. 2000-08-20 20:49:34 +00:00
Jim Meyering c93a607f05 (long_opts): Add --dereference, -L.
(usage): Describe -L and -H.
(cp_option_init): Initialize to DEREF_UNDEFINED, not `1'.
(main): Add `H' and `-L' to getopt spec string.
[case 'a']: Initialize `dereference' to DEREF_NEVER, not 0.
[case 'd']: Likewise.
[case 'H']: New case.
[case 'L']: New case.
[case 'R']: Don't set dereference to `0' here.
If it's not yet defined, set x.dereference to DEREF_NEVER
if -R was specified, else set it to DEREF_ALWAYS.
Set x.xstat accordingly for -H.
2000-08-20 20:48:57 +00:00
Jim Meyering 7b1d35af90 Declare lstat.
(copy_dir): Set `xstat' member to lstat so that with `-H' we don't
follow symlinks found via recursive traversal.
Update uses of `dereference' to compare against new enum member names.
2000-08-20 20:48:45 +00:00
Jim Meyering 33db1748a0 (enum Dereference_symlink): Define.
(struct cp_options) [dereference]: Change type to Dereference_symlink.
2000-08-20 20:35:25 +00:00
Jim Meyering 9c55b67dd4 . 2000-08-20 16:48:02 +00:00
Jim Meyering 74a00a63a0 . 2000-08-20 15:56:43 +00:00
Jim Meyering f801837d6c . 2000-08-20 15:56:11 +00:00
Jim Meyering 55692e275e *** empty log message *** 2000-08-20 12:45:35 +00:00
Jim Meyering 5bf6f179da Include utmp.h `#if HAVE_UTMP_H', rather than
`#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
2000-08-20 12:45:31 +00:00
Jim Meyering f9850882f1 (print_totals): Rename global from opt_combined_arguments. 2000-08-20 09:55:23 +00:00
Jim Meyering 5d0d80fc27 fix my grammar error in last change 2000-08-19 11:09:03 +00:00
Jim Meyering c055d35869 *** empty log message *** 2000-08-19 11:07:46 +00:00
Jim Meyering 61a8f5b321 *** empty log message *** 2000-08-19 11:07:37 +00:00
Jim Meyering 0dd04df27f (writeline): Correct comments.
From Bruno Haible.
2000-08-19 11:07:32 +00:00
Jim Meyering dde8f61f1c *** empty log message *** 2000-08-18 07:08:34 +00:00
Jim Meyering 1696188993 (DO_CHOWN): Do not make a special case for non-root.
POSIX.2 requires that cp -p and mv attempt to set the uid of the
destination file, even if you're not root.  This affects behavior
only on hosts that let you give files away via chmod.
2000-08-18 07:08:04 +00:00
Jim Meyering 3804c0288a *** empty log message *** 2000-08-15 13:12:57 +00:00
Jim Meyering 70b951593e Add tests for just-fixed bug. 2000-08-15 13:12:48 +00:00
Jim Meyering 614723b9c1 *** empty log message *** 2000-08-15 13:08:31 +00:00
Jim Meyering 849d512ee9 *** empty log message *** 2000-08-15 13:08:06 +00:00
Jim Meyering c4e4ba9607 *** empty log message *** 2000-08-15 13:07:40 +00:00
Jim Meyering 5f52473b9c *** empty log message *** 2000-08-15 13:05:21 +00:00
Jim Meyering f0a4b95c58 (count_entry): Remember the current directory also for `.'
and `..'.  Reported by Stephen Smoogen, based on a patch from H.J. Lu.
2000-08-15 13:05:03 +00:00
Jim Meyering d5d043c57a *** empty log message *** 2000-08-14 21:42:45 +00:00
Jim Meyering 5f14914c49 remove incorrect FIXME comment. 2000-08-14 21:40:30 +00:00
Jim Meyering 8c446739e7 *** empty log message *** 2000-08-14 09:58:58 +00:00
Jim Meyering 0f8dd3a954 (copy_reg): Move declaration of local, `n_read', into
the scope where it's used.
(copy_internal): In calling copy_reg, pass not the raw `src_mode',
but the possibly-umask-relative mode, `get_dest_mode (x, src_mode)'.
2000-08-14 09:58:25 +00:00
Jim Meyering d927d60b36 (copy_reg): Add comment. 2000-08-13 13:13:25 +00:00
Jim Meyering bed2ded78f *** empty log message *** 2000-08-13 13:05:16 +00:00
Jim Meyering 406f1dcb0f *** empty log message *** 2000-08-13 13:04:52 +00:00
Jim Meyering fc0b4f7672 *** empty log message *** 2000-08-13 13:04:27 +00:00
Jim Meyering 262dbfe2f6 *** empty log message *** 2000-08-13 13:03:41 +00:00
Jim Meyering 27289e8b53 *** empty log message *** 2000-08-13 13:03:13 +00:00
Jim Meyering 8656b00f6d (get_dest_mode): Rename from new_nondir_mode.
Honor the umask for `cp', but not for `mv' or `cp -p'.
(copy_reg): New 4th parameter, dst_mode.  Pass it as 3rd arg. to open.
(copy_internal): Change type of locals `src_mode' and `src_type' from
int to mode_t.
Remove unnecessary local `fix_mode'.
Combine two if-stmts into one.
Pass `src_mode' as 4th arg to copy_reg.
If we've just created a new regular file, return early, skipping the
chmod step.  copy_reg now sets permissions of such files upon creation.
Use get_dest_mode, so there's just one chmod call here.
2000-08-13 13:03:07 +00:00
Jim Meyering ce9d58029c Use jm_FUNC_UNLINK_BUSY_TEXT. 2000-08-12 13:27:29 +00:00
Jim Meyering c187c5884b *** empty log message *** 2000-08-12 13:25:33 +00:00
Jim Meyering ae8efa7087 . 2000-08-12 13:24:44 +00:00
Jim Meyering 13a7e4caf8 (TESTS): Add perm. 2000-08-12 13:24:31 +00:00
Jim Meyering 00874a5dad *** empty log message *** 2000-08-12 13:23:18 +00:00
Jim Meyering 52f1830329 Remove test for the VERSION_CONTROL and/or
SIMPLE_BACKUP_SUFFIX envvars.  Source ../envvar-check instead.
2000-08-12 13:22:59 +00:00