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