diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-12-14 18:00:42 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-12-14 18:04:05 -0800 |
commit | cfe1040c093be1c1a9b2403e713f1d1c2242a4bc (patch) | |
tree | 14de0a5fc39a117ea2d44e5cb297475585eb22fa /src | |
parent | 021a0664093506394fd8ee0a789ebfe6e6b69deb (diff) | |
download | coreutils-cfe1040c093be1c1a9b2403e713f1d1c2242a4bc.tar.xz |
du: -x should not count files in other file systems
This fixes Bug#10293, which I guess was introduced in commit
95c948b06a dated 2003-10-02.
* NEWS: Document fix.
* src/du.c (process_file): Don't count files in different file
systems if -x is given.
* tests/du/one-file-system: Test for this bug.
Diffstat (limited to 'src')
-rw-r--r-- | src/du.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -443,6 +443,9 @@ process_file (FTS *fts, FTSENT *ent) error (0, ent->fts_errno, _("cannot access %s"), quote (file)); return false; } + + if (fts->fts_options & FTS_XDEV && fts->fts_dev != sb->st_dev) + excluded = true; } if (excluded |