]> git.ipfire.org Git - thirdparty/coreutils.git/commit
df: improve detection of duplicate entries
authorLukáš Zaoral <lzaoral@redhat.com>
Tue, 14 Apr 2026 12:09:02 +0000 (14:09 +0200)
committerPádraig Brady <P@draigBrady.com>
Wed, 15 Apr 2026 11:56:16 +0000 (12:56 +0100)
commitf6fda635bdc8ea7b6665fa25f7ccc78484a47679
tree38280f14fb3d0d383fcbb7350bf7d59e6921f948
parent5cb0cca3b863e7aa5978f725c227c323a4a0d58f
df: improve detection of duplicate entries

Do not compare only with the latest entry for given device id but also
all previously saved entries with the same id.

* src/df.c (struct devlist): Add next_same_dev struct member.
(filter_mount_list): Iterate over next_same_dev to find duplicates.
* tests/df/skip-duplicates.sh: Add test cases.
* NEWS: Mention the improvement.
https://redhat.atlassian.net/browse/RHEL-5649
NEWS
src/df.c
tests/df/skip-duplicates.sh