statfs.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /* Definitions for getting information about a filesystem.
  2. Copyright (C) 1996, 1997, 1998, 1999, 2004 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, see
  14. <http://www.gnu.org/licenses/>. */
  15. #ifndef _SYS_STATFS_H
  16. #define _SYS_STATFS_H 1
  17. #include <features.h>
  18. /* Get the system-specific definition of `struct statfs'. */
  19. #include <bits/statfs.h>
  20. __BEGIN_DECLS
  21. /* Return information about the filesystem on which FILE resides. */
  22. #ifndef __USE_FILE_OFFSET64
  23. extern int statfs (const char *__file, struct statfs *__buf)
  24. __THROW __nonnull ((1, 2));
  25. libc_hidden_proto(statfs)
  26. #else
  27. # ifdef __REDIRECT_NTH
  28. extern int __REDIRECT_NTH (statfs,
  29. (const char *__file, struct statfs *__buf),
  30. statfs64) __nonnull ((1, 2));
  31. # else
  32. # define statfs statfs64
  33. # endif
  34. #endif
  35. #ifdef __USE_LARGEFILE64
  36. extern int statfs64 (const char *__file, struct statfs64 *__buf)
  37. __THROW __nonnull ((1, 2));
  38. libc_hidden_proto(statfs64)
  39. #endif
  40. /* Return information about the filesystem containing the file FILDES
  41. refers to. */
  42. #ifndef __USE_FILE_OFFSET64
  43. extern int fstatfs (int __fildes, struct statfs *__buf)
  44. __THROW __nonnull ((2));
  45. #else
  46. # ifdef __REDIRECT_NTH
  47. extern int __REDIRECT_NTH (fstatfs, (int __fildes, struct statfs *__buf),
  48. fstatfs64) __nonnull ((2));
  49. # else
  50. # define fstatfs fstatfs64
  51. # endif
  52. #endif
  53. #ifdef __USE_LARGEFILE64
  54. extern int fstatfs64 (int __fildes, struct statfs64 *__buf)
  55. __THROW __nonnull ((2));
  56. libc_hidden_proto(fstatfs64)
  57. #endif
  58. __END_DECLS
  59. #endif /* sys/statfs.h */