freebsd-nq/bin/cp
Jilles Tjoelker c633f8dc04 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)
MFC after:	1 week
2015-05-05 13:23:03 +00:00
..
cp.1 Add a few examples. 2013-03-15 20:12:54 +00:00
cp.c cp: Remove fts sorting. 2015-05-05 13:23:03 +00:00
extern.h
Makefile
utils.c cp,mv: Use futimens() instead of utimensat() if possible. 2015-03-23 17:35:05 +00:00