]> git.ipfire.org Git - thirdparty/coreutils.git/commit
df: use the last device name provided by the system
authorPádraig Brady <P@draigBrady.com>
Thu, 29 May 2014 14:30:46 +0000 (15:30 +0100)
committerPádraig Brady <P@draigBrady.com>
Thu, 29 May 2014 15:01:30 +0000 (16:01 +0100)
commit25a2c948b24163ce0e0e9e52f6a5fef33d7d7842
tree60ab5ff2fcd550420e8657ba3962ae5a6dab2687
parente4314774fd44bf2230a64f26c7f07383ddf6aa4c
df: use the last device name provided by the system

The device name reported for a particular mount entry
may no longer be valid if the mount point was subsequently
mounted on a different device.  Therefore honor the order
of the mount list returned by the system and use the last
reported device name.

* src/df.c (filter_mount_list): When discarding the current
mount entry, ensure that a new device name is not also discarded.
* tests/df/skip-duplicates.sh: Add a test case.  Also fix
a false failure in the edge case of a system with only a
single file system.
* NEWS: Mention the fix.
NEWS
src/df.c
tests/df/skip-duplicates.sh