diff options
author | Jim Meyering <jim@meyering.net> | 2000-11-23 15:36:58 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-11-23 15:36:58 +0000 |
commit | 9a4e9f426cf332327a6942540f17441486bd97ec (patch) | |
tree | 0f01eb2f8353a893681a5922f6b034b409ea13d3 /src | |
parent | 4e07d471cc982c915394608e98d3189bbc477169 (diff) | |
download | coreutils-9a4e9f426cf332327a6942540f17441486bd97ec.tar.xz |
(show_point): Before accepting an entry as a match, make sure that
the mount directory exists and has the required device number.
Before, e.g., `df /floppy' would mistakenly report on the root
partition if /floppy were not listed in /etc/mtab but / was.
Patch from Eirik Fuller (http://bugs.debian.org/76923).
Diffstat (limited to 'src')
-rw-r--r-- | src/df.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -612,7 +612,9 @@ show_point (const char *point, const struct stat *statp) } } - if (best_match && !STREQ (best_match->me_type, "lofs")) + if (best_match && !STREQ (best_match->me_type, "lofs") + && stat (best_match->me_mountdir, &disk_stats) == 0 + && disk_stats.st_dev == statp->st_dev) { me = best_match; goto show_me; |