summaryrefslogtreecommitdiff
path: root/src/df.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-09-26 04:18:55 +0000
committerJim Meyering <jim@meyering.net>1995-09-26 04:18:55 +0000
commit744393f0f40f58936a0842111585de57c94fcfc3 (patch)
tree998a53705ea8bd8b10b0fe7c0d262acac101f11c /src/df.c
parent6f200d798296206bb27dbe3a7f2925a659838ff0 (diff)
downloadcoreutils-744393f0f40f58936a0842111585de57c94fcfc3.tar.xz
(show_point): Ignore mtab entries with either
nonexistent mount points or with inconsistent device number. From Eirik Fuller <eirik@synopsys.com>.
Diffstat (limited to 'src/df.c')
-rw-r--r--src/df.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/df.c b/src/df.c
index 3de9a62e1..a6b0fe73e 100644
--- a/src/df.c
+++ b/src/df.c
@@ -352,6 +352,10 @@ show_point (point, statp)
if (statp->st_dev == me->me_dev)
{
+ /* Skip bogus mtab entries. */
+ if (stat (me->me_mountdir, &disk_stats) != 0 ||
+ disk_stats.st_dev != me->me_dev)
+ continue;
show_dev (me->me_devname, me->me_mountdir, me->me_type);
return;
}