History log of /freebsd-10-stable/bin/cp/cp.c
Revision Date Author Comments
# 291774 04-Dec-2015 bdrewery

MFC r284105,r284106,r284163:

r284105:
Cleanup some indentation issues.
r284106:
Implement '-s' to copy as symlink, similar to the current -l link(2)
handling.
r284163:
Cleanup some style(9) issues.

Relnotes: yes


# 282890 14-May-2015 jilles

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)


# 282890 14-May-2015 jilles

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)