freebsd-src/bin/cp
Jilles Tjoelker 3b4ce65586 MFC r282482: cp: Remove fts sorting.
In an attempt to improve performance, cp reordered directories first
(although the comment says directories last). This is not effective with new
UFS layout policies.

The sorting reorders multiple arguments passed to cp, which may be
undesirable.

Additionally, the comparison function does not induce a total order. Per
POSIX, this causes undefined behaviour in qsort().

NetBSD removed the sorting in 2009.

On filesystems that return directory entries in hash/btree order, sorting by
d_fileno before statting improves performance on large directories. However,
this can only be implemented in fts(3).

PR:		53475
Reviewed by:	bde (in 2004)
2015-05-14 10:46:20 +00:00
..
cp.1 Add a few examples. 2013-03-15 20:12:54 +00:00
cp.c MFC r282482: cp: Remove fts sorting. 2015-05-14 10:46:20 +00:00
extern.h Add an option to allow copying of a hierarchy while linking he regular files. 2006-08-24 20:45:38 +00:00
Makefile Make 'struct acl' larger, as required to support NFSv4 ACLs. Provide 2009-05-22 15:56:43 +00:00
utils.c Return with an error from copy_link(), copy_fifo() and copy_special() if 2013-01-27 05:59:28 +00:00