diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-06-24 18:59:03 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-06-24 18:59:03 +0000 |
commit | 51d1ca00fd1ddc2ed77b615b7a23ecdf3e8a55a9 (patch) | |
tree | fa436b689653e00dadaafd8f2dacd29bd7b97ef7 /sysdeps/unix/sysv/linux/statfs64.c | |
parent | cd18a5f14aab2ccffc304d8149c9dae5028b465f (diff) | |
download | glibc-51d1ca00fd1ddc2ed77b615b7a23ecdf3e8a55a9.tar.gz glibc-51d1ca00fd1ddc2ed77b615b7a23ecdf3e8a55a9.tar.xz glibc-51d1ca00fd1ddc2ed77b615b7a23ecdf3e8a55a9.zip |
Update.
2003-06-24 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/fstatfs64.c (__fstatfs64): Add support for the fstatfs64 syscall. * sysdeps/unix/sysv/linux/statfs64.c (__statfs64): Add support for the statfs64 syscall. * sysdeps/unix/sysv/linux/kernel-features.h: Define __ASSUME_STATFS64 appropriately. * sysdeps/unix/sysv/linux/internal_statvfs.c: Use f_frsize field from statfs structure if it has been filled in. * sysdeps/unix/sysv/linux/bits/statfs.h (struct statfs): Add f_frsize field. (struct statfs64): Likewise. * sysdeps/unix/sysv/linux/alpha/bits/statfs.h: Likewise. * sysdeps/unix/sysv/linux/s390/bits/statfs.h: Likewise. instead of __libc_cleanup_region_*.
Diffstat (limited to 'sysdeps/unix/sysv/linux/statfs64.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/statfs64.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/statfs64.c b/sysdeps/unix/sysv/linux/statfs64.c index 08abab65a2..210e4648bd 100644 --- a/sysdeps/unix/sysv/linux/statfs64.c +++ b/sysdeps/unix/sysv/linux/statfs64.c @@ -1,5 +1,5 @@ /* Return information about the filesystem on which FILE resides. - Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996,1997,1998,1999,2000,2003 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,11 +21,33 @@ #include <string.h> #include <sys/statfs.h> #include <stddef.h> +#include <sysdep.h> + +int __no_statfs64 attribute_hidden; /* Return information about the filesystem on which FILE resides. */ int __statfs64 (const char *file, struct statfs64 *buf) { +#ifdef __NR_statfs64 +# if __ASSUME_STATFS64 == 0 + if (! __no_statfs64) +# endif + { + int result = INLINE_SYSCALL (statfs64, 3, file, sizeof (*buf), buf); + +# if __ASSUME_STATFS64 == 0 + if (result == 0 || errno != ENOSYS) +# endif + return result; + +# if __ASSUME_STATFS64 == 0 + __no_statfs64 = 1; +# endif + } +#endif + +#if __ASSUME_STATFS64 == 0 struct statfs buf32; if (__statfs (file, &buf32) < 0) @@ -40,8 +62,10 @@ __statfs64 (const char *file, struct statfs64 *buf) buf->f_ffree = buf32.f_ffree; buf->f_fsid = buf32.f_fsid; buf->f_namelen = buf32.f_namelen; + buf->f_frsize = buf32.f_frsize; memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare)); return 0; +#endif } weak_alias (__statfs64, statfs64) |