cp: Rename -d option to -P

The -d option is a GNU extension and is equivalent to its "-P
--preserve=links" options.

Since we don't implement the --preserve=links functionality anyway (it
means preserve hard links between files), just call it -P, which is
specified by POSIX.

Additionally, there is no need to check for cp_Pflag again before
copying the symlink itself because the only way the mode in the stat
will indicate a symlink is if we used lstat (which we only do if -P is
specified).
This commit is contained in:
Michael Forney
2014-12-08 03:25:24 +00:00
committed by sin
parent 573ef00c91
commit e14e0becce
4 changed files with 11 additions and 11 deletions

2
fs.h
View File

@@ -1,7 +1,7 @@
/* See LICENSE file for copyright and license details. */
extern int cp_aflag;
extern int cp_dflag;
extern int cp_fflag;
extern int cp_Pflag;
extern int cp_pflag;
extern int cp_rflag;
extern int cp_vflag;