about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/statvfs.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-01-18 10:53:15 +0000
committerUlrich Drepper <drepper@redhat.com>2000-01-18 10:53:15 +0000
commitc7e85d0c08ccbfc7604f6d50579c3a4b25281ff1 (patch)
treeaacc8173cb2fc87edb5fde53c4bc83aa160c79fa /sysdeps/unix/sysv/linux/statvfs.c
parent6e9b72d3abab3236a2e079587ad5c5653d96e7bd (diff)
downloadglibc-c7e85d0c08ccbfc7604f6d50579c3a4b25281ff1.tar.gz
glibc-c7e85d0c08ccbfc7604f6d50579c3a4b25281ff1.tar.xz
glibc-c7e85d0c08ccbfc7604f6d50579c3a4b25281ff1.zip
Update.
	* posix/TESTS: Fix expected result for test cases with * with no
	leading expression.
Diffstat (limited to 'sysdeps/unix/sysv/linux/statvfs.c')
-rw-r--r--sysdeps/unix/sysv/linux/statvfs.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/statvfs.c b/sysdeps/unix/sysv/linux/statvfs.c
index 9bbe6c2f99..7f85c9b726 100644
--- a/sysdeps/unix/sysv/linux/statvfs.c
+++ b/sysdeps/unix/sysv/linux/statvfs.c
@@ -18,8 +18,12 @@
    Boston, MA 02111-1307, USA.  */
 
 #include <errno.h>
-#include <fcntl.h>
-#include <unistd.h>
+#include <mntent.h>
+#include <paths.h>
+#include <string.h>
+#include <sys/mount.h>
+#include <sys/stat.h>
+#include <sys/statfs.h>
 #include <sys/statvfs.h>
 
 
@@ -30,11 +34,12 @@ statvfs (const char *file, struct statvfs *buf)
   struct stat st;
 
   /* Get as much information as possible from the system.  */
-  if (__statfs (fd, &fsbuf) < 0)
+  if (__statfs (file, &fsbuf) < 0)
     return -1;
 
+#define STAT(st) stat (file, st)
 #include "internal_statvfs.c"
-  
+
   /* We signal success if the statfs call succeeded.  */
   return 0;
 }