summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/fstatvfs.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-09-17 00:49:19 +0000
committerUlrich Drepper <drepper@redhat.com>2003-09-17 00:49:19 +0000
commitd0501a245c7f6c8bf399594d9b331d915580d36f (patch)
tree9b9ca38e5ae1663919fa0071b35ebb9db73da17d /sysdeps/unix/sysv/linux/fstatvfs.c
parente07bb02a4f9e7d98f79f428a661c5b982286869d (diff)
downloadglibc-d0501a245c7f6c8bf399594d9b331d915580d36f.tar.gz
Update.
2003-09-16 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/Dist: Remove internal_statvfs.c. * sysdeps/unix/sysv/linux/Makefile [subdir=io] (sysdep_routines): Add internal_statvfs. * sysdeps/unix/sysv/linux/fstatvfs.c: Call __internal_statvfs instead of including "internal_statvfs.c". * sysdeps/unix/sysv/linux/statvfs.c: Likewise. * sysdeps/unix/sysv/linux/internal_statvfs.c: Make it a real function. Add code to avoid the stat calls on all the reported mount points when we can determine mismatch in advance. * sysdeps/unix/sysv/linux/linux_fsinfo.h: Add AUTOFS_SUPER_MAGIC and USBDEVFS_SUPER_MAGIC. 2003-09-16 Jakub Jelinek <jakub@redhat.com> * posix/Versions (sched_getaffinity, sched_setaffinity): Change from GLIBC_2.3.2 to GLIBC_2.3.3 symbol version. 2003-09-16 Bruno Haible <bruno@clisp.org> * intl/tst-gettext2.sh: Set GCONV_PATH and LOCPATH only after invoking msgfmt, not before.
Diffstat (limited to 'sysdeps/unix/sysv/linux/fstatvfs.c')
-rw-r--r--sysdeps/unix/sysv/linux/fstatvfs.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/sysdeps/unix/sysv/linux/fstatvfs.c b/sysdeps/unix/sysv/linux/fstatvfs.c
index 0bfce16309..0dd56c1046 100644
--- a/sysdeps/unix/sysv/linux/fstatvfs.c
+++ b/sysdeps/unix/sysv/linux/fstatvfs.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -17,16 +17,14 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <errno.h>
-#include <mntent.h>
-#include <paths.h>
-#include <stdio_ext.h>
-#include <string.h>
-#include <sys/mount.h>
+#include <stddef.h>
#include <sys/stat.h>
#include <sys/statfs.h>
#include <sys/statvfs.h>
+extern void __internal_statvfs (const char *name, struct statvfs *buf,
+ struct statfs *fsbuf, struct stat64 *st);
+
int
fstatvfs (int fd, struct statvfs *buf)
@@ -38,8 +36,8 @@ fstatvfs (int fd, struct statvfs *buf)
if (__fstatfs (fd, &fsbuf) < 0)
return -1;
-#define STAT(st) fstat64 (fd, st)
-#include "internal_statvfs.c"
+ /* Convert the result. */
+ __internal_statvfs (NULL, buf, &fsbuf, fstat64 (fd, &st) == -1 ? NULL : &st);
/* We signal success if the statfs call succeeded. */
return 0;