summaryrefslogtreecommitdiff
path: root/src/du-tests
diff options
context:
space:
mode:
authorOndrej Oprala <ooprala@redhat.com>2013-01-25 01:07:58 +0100
committerBernhard Voelker <mail@bernhard-voelker.de>2013-01-27 18:43:58 +0100
commitbb116d35bf6248d803826fb582a141d02a311e71 (patch)
tree5186358b5ea10623b24de996abac81a329e1043d /src/du-tests
parentf8c0258d4643dbabc461a84d0b940be44a680a9b (diff)
downloadcoreutils-bb116d35bf6248d803826fb582a141d02a311e71.tar.xz
df: prefer fullpath entries when deduplicating
* src/df.c (struct devlist): Add a new element for storing pointers to mount_entry structures. (devlist_head, dev_examined): Remove. (filter_mount_list): Add new function to filter out the rootfs entry (unless -trootfs is specified), and duplicities. The function favors entries with a '/' character in me_devname or those with the shortest me_mountdir string, if multiple entries fulfill the first condition. Use struct devlist to build up a list of entries already known, and finally rebuild the global mount_list. (get_all_entries): Call the above new function unless the -a option is specified. (get_dev): Remove the code for skipping rootfs and duplicities. * tests/df/skip-duplicates.sh: Add test cases. Co-authored-by: Bernhard Voelker <mail@bernhard-voelker.de>
Diffstat (limited to 'src/du-tests')
0 files changed, 0 insertions, 0 deletions