summaryrefslogtreecommitdiff
path: root/busybox/coreutils/cp.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2005-07-18 23:51:27 +0000
committerEric Andersen <andersen@codepoet.org>2005-07-18 23:51:27 +0000
commit164a716f964bba247c660bc70149234f95146871 (patch)
tree95a8a6f75cb2ed1bb07cb6019088db7348ebf4d4 /busybox/coreutils/cp.c
parent8c59a0bf0e9e2d87b0ff273ea3f0bf05bbbf6373 (diff)
downloadbusybox-w32-164a716f964bba247c660bc70149234f95146871.tar.gz
busybox-w32-164a716f964bba247c660bc70149234f95146871.tar.bz2
busybox-w32-164a716f964bba247c660bc70149234f95146871.zip
busybox-1.0.1-rc1.patch
http://busybox.net/lists/busybox/2005-July/014974.html
Diffstat (limited to 'busybox/coreutils/cp.c')
-rw-r--r--busybox/coreutils/cp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/busybox/coreutils/cp.c b/busybox/coreutils/cp.c
index 6a82f6bff..97731e83f 100644
--- a/busybox/coreutils/cp.c
+++ b/busybox/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