statfs.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /* Copyright (C) 1997, 2000 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. The GNU C Library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public
  5. License as published by the Free Software Foundation; either
  6. version 2.1 of the License, or (at your option) any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public
  12. License along with the GNU C Library; if not, write to the Free
  13. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  14. 02111-1307 USA. */
  15. #ifndef _SYS_STATFS_H
  16. # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
  17. #endif
  18. #include <bits/types.h> /* for __fsid_t and __fsblkcnt_t*/
  19. struct statfs
  20. {
  21. long int f_type;
  22. #define f_fstyp f_type
  23. long int f_bsize;
  24. long int f_frsize; /* Fragment size - unsupported */
  25. #ifndef __USE_FILE_OFFSET64
  26. __fsblkcnt_t f_blocks;
  27. __fsblkcnt_t f_bfree;
  28. __fsblkcnt_t f_files;
  29. __fsblkcnt_t f_ffree;
  30. __fsblkcnt_t f_bavail;
  31. #else
  32. __fsblkcnt64_t f_blocks;
  33. __fsblkcnt64_t f_bfree;
  34. __fsblkcnt64_t f_files;
  35. __fsblkcnt64_t f_ffree;
  36. __fsblkcnt64_t f_bavail;
  37. #endif
  38. /* Linux specials */
  39. __fsid_t f_fsid;
  40. long int f_namelen;
  41. long int f_spare[6];
  42. };
  43. #ifdef __USE_LARGEFILE64
  44. struct statfs64
  45. {
  46. long int f_type;
  47. #define f_fstyp f_type
  48. long int f_bsize;
  49. long int f_frsize; /* Fragment size - unsupported */
  50. __fsblkcnt64_t f_blocks;
  51. __fsblkcnt64_t f_bfree;
  52. __fsblkcnt64_t f_files;
  53. __fsblkcnt64_t f_ffree;
  54. __fsblkcnt64_t f_bavail;
  55. /* Linux specials */
  56. __fsid_t f_fsid;
  57. long int f_namelen;
  58. long int f_spare[6];
  59. };
  60. #endif
  61. /* Tell code we have these members. */
  62. #define _STATFS_F_NAMELEN