statvfs.h 819 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (c) mlibc & plct lab
  3. *
  4. * SPDX-License-Identifier: MIT
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2024/8/8 0Bitbiscuits the first version
  9. */
  10. #ifndef MLIBC_SYS_STATVFS_H__
  11. #define MLIBC_SYS_STATVFS_H__
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. #define __NEED_fsblkcnt_t
  16. #define __NEED_fsfilcnt_t
  17. #include <features.h>
  18. #include <alltypes.h>
  19. struct statvfs {
  20. unsigned long f_bsize, f_frsize;
  21. fsblkcnt_t f_blocks, f_bfree, f_bavail;
  22. fsfilcnt_t f_files, f_ffree, f_favail;
  23. unsigned :8*(2*sizeof(int)-sizeof(long));
  24. unsigned long f_fsid;
  25. unsigned long f_flag, f_namemax;
  26. unsigned int f_type;
  27. int __reserved[5];
  28. };
  29. int statvfs (const char *__restrict, struct statvfs *__restrict);
  30. int fstatvfs (int, struct statvfs *);
  31. #ifdef __cplusplus
  32. }
  33. #endif
  34. #endif