123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- #include <features.h>
- #include <errno.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>
- #ifndef __USE_FILE_OFFSET64
- extern int fstatfs (int __fildes, struct statfs *__buf)
- __THROW __nonnull ((2));
- #else
- # ifdef __REDIRECT_NTH
- extern int __REDIRECT_NTH (fstatfs, (int __fildes, struct statfs *__buf),
- fstatfs64) __nonnull ((2));
- # else
- # define fstatfs fstatfs64
- # endif
- #endif
- extern __typeof(fstatfs) __libc_fstatfs;
- int fstatvfs (int fd, struct statvfs *buf)
- {
- struct statfs fsbuf;
- struct stat st;
-
- if (__libc_fstatfs (fd, &fsbuf) < 0)
- return -1;
- #define STAT(st) fstat (fd, st)
- #include "internal_statvfs.c"
-
- return 0;
- }
- libc_hidden_def(fstatvfs)
|