[BusyBox-cvs] CVS busybox/coreutils

CVS User vapier vapier at codepoet.org
Fri Jan 7 00:56:47 UTC 2005


Update of /var/cvs/busybox/coreutils
In directory nail:/tmp/cvs-serv8616/coreutils

Modified Files:
	cp.c 
Log Message:
cp: make -P a synonym for -d

--- /var/cvs/busybox/coreutils/cp.c	2004/01/25 05:50:28	1.22
+++ /var/cvs/busybox/coreutils/cp.c	2005/01/07 00:56:46	1.23
@@ -42,7 +42,7 @@
 #include "libcoreutils/coreutils.h"
 
 /* WARNING!! ORDER IS IMPORTANT!! */
-static const char cp_opts[] = "pdRfiar";
+static const char cp_opts[] = "pdRfiarP";
 
 extern int cp_main(int argc, char **argv)
 {
@@ -73,6 +73,12 @@
  		 */
 		flags |= FILEUTILS_RECUR;
 	}
+	if (flags & 128) {
+		/* Make -P a synonym for -d,
+		 * -d is the GNU option while -P is the POSIX 2003 option
+		 */
+		flags |= FILEUTILS_DEREFERENCE;
+	}
 
 	flags ^= FILEUTILS_DEREFERENCE;		/* The sense of this flag was reversed. */
 



More information about the busybox-cvs mailing list