bug 2443: bin/cp: sync with FreeBSD (bug fixes + new options)
authorJohn Marino <draco@marino.st>
Thu, 15 Nov 2012 20:57:01 +0000 (21:57 +0100)
committerJohn Marino <draco@marino.st>
Thu, 15 Nov 2012 23:06:56 +0000 (00:06 +0100)
commit7cfd531a3bf703c2ef3f01a325d0f976c2294303
treea9ec019fb3cf952090efe10583281e9a56a74703
parent3d4204d75da1c2fa88798225754f59a4c347f400
bug 2443: bin/cp: sync with FreeBSD (bug fixes + new options)

* Fix FTS_NOCHDIR behavior on empty directory.
* Add -a option (archive mode, equivalent to -RpP)
* Add -l option (create hard links instead of copying)
* Add -x option (FS mount points are not traversed)
* Preserve file flags on symlinks on cp -Rp
* Don't copy socket anyway after "xxx is a socket (not copied)"
* Avoid division-by-zero situations
* make -r synonym for -R but maintain -r behavior with -L

Taken-from: FreeBSD (multiple commits)
https://bugs.dragonflybsd.org/issues/2443
bin/cp/cp.1
bin/cp/cp.c
bin/cp/extern.h
bin/cp/utils.c
lib/libc/gen/fts.c