statx-generic.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* Generic statx-related definitions and declarations.
  2. Copyright (C) 2018-2021 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. <https://www.gnu.org/licenses/>. */
  15. /* This interface is based on <linux/stat.h> in Linux. */
  16. #ifndef _SYS_STAT_H
  17. # error Never include <bits/statx-generic.h> directly, include <sys/stat.h> instead.
  18. #endif
  19. #include <bits/types/struct_statx_timestamp.h>
  20. #include <bits/types/struct_statx.h>
  21. #ifndef STATX_TYPE
  22. # define STATX_TYPE 0x0001U
  23. # define STATX_MODE 0x0002U
  24. # define STATX_NLINK 0x0004U
  25. # define STATX_UID 0x0008U
  26. # define STATX_GID 0x0010U
  27. # define STATX_ATIME 0x0020U
  28. # define STATX_MTIME 0x0040U
  29. # define STATX_CTIME 0x0080U
  30. # define STATX_INO 0x0100U
  31. # define STATX_SIZE 0x0200U
  32. # define STATX_BLOCKS 0x0400U
  33. # define STATX_BASIC_STATS 0x07ffU
  34. # define STATX_ALL 0x0fffU
  35. # define STATX_BTIME 0x0800U
  36. # define STATX_MNT_ID 0x1000U
  37. # define STATX__RESERVED 0x80000000U
  38. # define STATX_ATTR_COMPRESSED 0x0004
  39. # define STATX_ATTR_IMMUTABLE 0x0010
  40. # define STATX_ATTR_APPEND 0x0020
  41. # define STATX_ATTR_NODUMP 0x0040
  42. # define STATX_ATTR_ENCRYPTED 0x0800
  43. # define STATX_ATTR_AUTOMOUNT 0x1000
  44. # define STATX_ATTR_MOUNT_ROOT 0x2000
  45. # define STATX_ATTR_VERITY 0x100000
  46. # define STATX_ATTR_DAX 0x200000
  47. #endif /* !STATX_TYPE */
  48. __BEGIN_DECLS
  49. /* Fill *BUF with information about PATH in DIRFD. */
  50. int statx (int __dirfd, const char *__restrict __path, int __flags,
  51. unsigned int __mask, struct statx *__restrict __buf)
  52. __THROW __nonnull ((2, 5));
  53. __END_DECLS