In recent versions of fileutils (the enclosed patch is against 4.0x)
the code in df which handles mount points which are not listed is
never reached if /etc/mtab lists the root directory's mount point.
With this patch, df reaches that code.
--- src/df.c- Mon Jun 26 14:51:19 2000
+++ src/df.c Sat Aug 5 23:58:39 2000
@@ -611,7 +611,9 @@
}
}
- 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;