summaryrefslogtreecommitdiff
path: root/src/sort.c
diff options
context:
space:
mode:
authorPaul R. Eggert <eggert@cs.ucla.edu>2010-07-24 00:19:33 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2010-07-24 00:20:07 -0700
commit77428214f13e1d7b81348fd301a388cb4ce8a2a0 (patch)
tree62792ebdfd1e415f65383b52b57c64537836dc6c /src/sort.c
parent9a3c600f11b254bc601a96ee607129cba69c8029 (diff)
downloadcoreutils-77428214f13e1d7b81348fd301a388cb4ce8a2a0.tar.xz
du: tune, and fix some -L bugs with dangling or cyclic symlinks
* src/du.c (process_file): Avoid recalculation of hashes and of file-exclusion for directories. Do not descend into the same directory more than once, unless -l is given; this is faster. Calculate stat buffer lazily, since it need not be computed at all for excluded files. Count space if FTS_ERR, since stat buffer is always valid then. No need for 'print' local variable. (main): Use FTS_NOSTAT. Use FTS_TIGHT_CYCLE_CHECK only when not hashing everything, since process_file finds cycles on its own when hashing everything. * tests/du/deref: Add test cases for -L bugs.
Diffstat (limited to 'src/sort.c')
0 files changed, 0 insertions, 0 deletions