1
0

statx-generic.h 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. //
  2. // Copyright 2026 Aarav Ravindra Kharade
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. //
  16. /* Generic statx-related definitions and declarations.
  17. Copyright (C) 2018-2026 Free Software Foundation, Inc.
  18. This file is part of the GNU C Library.
  19. The GNU C Library is free software; you can redistribute it and/or
  20. modify it under the terms of the GNU Lesser General Public
  21. License as published by the Free Software Foundation; either
  22. version 2.1 of the License, or (at your option) any later version.
  23. The GNU C Library is distributed in the hope that it will be useful,
  24. but WITHOUT ANY WARRANTY; without even the implied warranty of
  25. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  26. Lesser General Public License for more details.
  27. You should have received a copy of the GNU Lesser General Public
  28. License along with the GNU C Library; if not, see
  29. <https://www.gnu.org/licenses/>. */
  30. /* This interface is based on <linux/stat.h> in Linux. */
  31. #ifndef _SYS_STAT_H
  32. # error Never include <bits/statx-generic.h> directly, include <sys/stat.h> instead.
  33. #endif
  34. #include <bits/types/struct_statx_timestamp.h>
  35. #include <bits/types/struct_statx.h>
  36. #ifndef STATX_TYPE
  37. # define STATX_TYPE 0x0001U
  38. # define STATX_MODE 0x0002U
  39. # define STATX_NLINK 0x0004U
  40. # define STATX_UID 0x0008U
  41. # define STATX_GID 0x0010U
  42. # define STATX_ATIME 0x0020U
  43. # define STATX_MTIME 0x0040U
  44. # define STATX_CTIME 0x0080U
  45. # define STATX_INO 0x0100U
  46. # define STATX_SIZE 0x0200U
  47. # define STATX_BLOCKS 0x0400U
  48. # define STATX_BASIC_STATS 0x07ffU
  49. # define STATX_ALL 0x0fffU
  50. # define STATX_BTIME 0x0800U
  51. # define STATX_MNT_ID 0x1000U
  52. # define STATX_DIOALIGN 0x2000U
  53. # define STATX_MNT_ID_UNIQUE 0x4000U
  54. # define STATX_SUBVOL 0x8000U
  55. # define STATX_WRITE_ATOMIC 0x00010000U
  56. # define STATX_DIO_READ_ALIGN 0x00020000U
  57. # define STATX__RESERVED 0x80000000U
  58. # define STATX_ATTR_COMPRESSED 0x0004
  59. # define STATX_ATTR_IMMUTABLE 0x0010
  60. # define STATX_ATTR_APPEND 0x0020
  61. # define STATX_ATTR_NODUMP 0x0040
  62. # define STATX_ATTR_ENCRYPTED 0x0800
  63. # define STATX_ATTR_AUTOMOUNT 0x1000
  64. # define STATX_ATTR_MOUNT_ROOT 0x2000
  65. # define STATX_ATTR_VERITY 0x100000
  66. # define STATX_ATTR_DAX 0x200000
  67. # define STATX_ATTR_WRITE_ATOMIC 0x00400000
  68. #endif /* !STATX_TYPE */
  69. __BEGIN_DECLS
  70. /* Fill *BUF with information about PATH in DIRFD. */
  71. int statx (int __dirfd, const char *__restrict __path, int __flags,
  72. unsigned int __mask, struct statx *__restrict __buf)
  73. __THROW __nonnull ((5));
  74. __END_DECLS