aboutsummaryrefslogtreecommitdiff
path: root/coreutils/cp.c
diff options
context:
space:
mode:
authorvapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-01-07 00:56:47 +0000
committervapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-01-07 00:56:47 +0000
commitdf357000d668174cc11e0775da45f5535c429b22 (patch)
tree21b46eb4637ead189d6abdfd9194d0f7543efb0e /coreutils/cp.c
parent7b0e0c66e5a75b778aaadcea4df7669ba07945b4 (diff)
downloadbusybox-w32-df357000d668174cc11e0775da45f5535c429b22.tar.gz
busybox-w32-df357000d668174cc11e0775da45f5535c429b22.tar.bz2
busybox-w32-df357000d668174cc11e0775da45f5535c429b22.zip
cp: make -P a synonym for -d
git-svn-id: svn://busybox.net/trunk/busybox@9650 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'coreutils/cp.c')
-rw-r--r--coreutils/cp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/coreutils/cp.c b/coreutils/cp.c
index 6a82f6bff..97731e83f 100644
--- a/coreutils/cp.c
+++ b/coreutils/cp.c
@@ -42,7 +42,7 @@
42#include "libcoreutils/coreutils.h" 42#include "libcoreutils/coreutils.h"
43 43
44/* WARNING!! ORDER IS IMPORTANT!! */ 44/* WARNING!! ORDER IS IMPORTANT!! */
45static const char cp_opts[] = "pdRfiar"; 45static const char cp_opts[] = "pdRfiarP";
46 46
47extern int cp_main(int argc, char **argv) 47extern int cp_main(int argc, char **argv)
48{ 48{
@@ -73,6 +73,12 @@ extern int cp_main(int argc, char **argv)
73 */ 73 */
74 flags |= FILEUTILS_RECUR; 74 flags |= FILEUTILS_RECUR;
75 } 75 }
76 if (flags & 128) {
77 /* Make -P a synonym for -d,
78 * -d is the GNU option while -P is the POSIX 2003 option
79 */
80 flags |= FILEUTILS_DEREFERENCE;
81 }
76 82
77 flags ^= FILEUTILS_DEREFERENCE; /* The sense of this flag was reversed. */ 83 flags ^= FILEUTILS_DEREFERENCE; /* The sense of this flag was reversed. */
78 84