fsusage.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* fsusage.h -- declarations for filesystem space usage info
  2. Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 2, or (at your option)
  6. any later version.
  7. This program 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
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software Foundation,
  13. Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  14. /* Space usage statistics for a filesystem. Blocks are 512-byte. */
  15. #if !defined FSUSAGE_H_
  16. # define FSUSAGE_H_
  17. struct fs_usage
  18. {
  19. int fsu_blocksize; /* Size of a block. */
  20. uintmax_t fsu_blocks; /* Total blocks. */
  21. uintmax_t fsu_bfree; /* Free blocks available to superuser. */
  22. uintmax_t fsu_bavail; /* Free blocks available to non-superuser. */
  23. int fsu_bavail_top_bit_set; /* 1 if fsu_bavail represents a value < 0. */
  24. uintmax_t fsu_files; /* Total file nodes. */
  25. uintmax_t fsu_ffree; /* Free file nodes. */
  26. };
  27. # ifndef PARAMS
  28. # if defined PROTOTYPES || (defined __STDC__ && __STDC__)
  29. # define PARAMS(Args) Args
  30. # else
  31. # define PARAMS(Args) ()
  32. # endif
  33. # endif
  34. int get_fs_usage PARAMS ((const char *path, const char *disk,
  35. struct fs_usage *fsp));
  36. #endif