diff options
author | Ondrej Oprala <ooprala@redhat.com> | 2013-01-25 01:07:58 +0100 |
---|---|---|
committer | Bernhard Voelker <mail@bernhard-voelker.de> | 2013-01-27 18:43:58 +0100 |
commit | bb116d35bf6248d803826fb582a141d02a311e71 (patch) | |
tree | 5186358b5ea10623b24de996abac81a329e1043d /tests/du | |
parent | f8c0258d4643dbabc461a84d0b940be44a680a9b (diff) | |
download | coreutils-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 'tests/du')
0 files changed, 0 insertions, 0 deletions