summaryrefslogtreecommitdiff
path: root/m4/fsusage.m4
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-03-04 09:16:35 +0000
committerJim Meyering <jim@meyering.net>2003-03-04 09:16:35 +0000
commitf31ebeed31f783774a15217af7b1df44b3d4a0ae (patch)
tree92a6d217367def7e2298f9964e2e1a864b3e21b4 /m4/fsusage.m4
parent8617b0d5904ebce52506f9ea871e36aee06607c7 (diff)
downloadcoreutils-f31ebeed31f783774a15217af7b1df44b3d4a0ae.tar.xz
`df /some/mount-point' no longer hangs when an unrelated hard-mount
is unavailable [__GLIBC__]: GNU libc's statvfs stats each mount point in /proc/mounts until it finds one with matching device number. This is unnecessary when the FILE argument *is* a mount point. No stat call is necessary in that case. So, disable the statvfs-testing code on systems with GNU libc. Reported by Andrei Gaponenko via Tim Waugh as RedHat bug# 84846.
Diffstat (limited to 'm4/fsusage.m4')
-rw-r--r--m4/fsusage.m47
1 files changed, 6 insertions, 1 deletions
diff --git a/m4/fsusage.m4 b/m4/fsusage.m4
index 451a5cc8c..ad63154ac 100644
--- a/m4/fsusage.m4
+++ b/m4/fsusage.m4
@@ -1,4 +1,4 @@
-#serial 8
+#serial 9
# From fileutils/configure.in
@@ -24,6 +24,11 @@ if test $ac_fsusage_space = no; then
# SVR4
AC_CACHE_CHECK([for statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
[AC_TRY_LINK([#include <sys/types.h>
+#ifdef __GLIBC__
+Do not use statvfs on systems with GNU libc, because that function stats
+all preceding entries in /proc/mounts, and that makes df hang if even
+one of the corresponding file systems is hard-mounted, but not available.
+#endif
#include <sys/statvfs.h>],
[struct statvfs fsd; statvfs (0, &fsd);],
fu_cv_sys_stat_statvfs=yes,