Skip to content

Commit 8dcd556

Browse files
committed
Auto merge of #2941 - SteveLauC:statx-constants-on-gnu-linux, r=JohnTitor
add missing STATX_ATTR_* constants on gnu/linux Corresponds to [this](https://github.com/torvalds/linux/blob/master/include/uapi/linux/stat.h#L189~L191): ```c #define STATX_ATTR_MOUNT_ROOT 0x00002000 /* Root of a mount */ #define STATX_ATTR_VERITY 0x00100000 /* [I] Verity protected file */ #define STATX_ATTR_DAX 0x00200000 /* File is currently in DAX state */ ```
2 parents f064e97 + a8c85b4 commit 8dcd556

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

libc-test/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3313,6 +3313,9 @@ fn test_linux(target: &str) {
33133313
| "IFLA_ALT_IFNAME"
33143314
| "IFLA_PERM_ADDRESS"
33153315
| "IFLA_PROTO_DOWN_REASON"
3316+
| "STATX_ATTR_MOUNT_ROOT"
3317+
| "STATX_ATTR_VERITY"
3318+
| "STATX_ATTR_DAX"
33163319
if sparc64 => true,
33173320
// Added in Linux 5.13
33183321
"PTRACE_GET_RSEQ_CONFIGURATION" if sparc64 => true,

libc-test/semver/linux-gnu.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,9 @@ STATX_ATTR_COMPRESSED
424424
STATX_ATTR_ENCRYPTED
425425
STATX_ATTR_IMMUTABLE
426426
STATX_ATTR_NODUMP
427+
STATX_ATTR_MOUNT_ROOT
428+
STATX_ATTR_VERITY
429+
STATX_ATTR_DAX
427430
STATX_BASIC_STATS
428431
STATX_BLOCKS
429432
STATX_BTIME

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,9 @@ pub const STATX_ATTR_APPEND: ::c_int = 0x0020;
10261026
pub const STATX_ATTR_NODUMP: ::c_int = 0x0040;
10271027
pub const STATX_ATTR_ENCRYPTED: ::c_int = 0x0800;
10281028
pub const STATX_ATTR_AUTOMOUNT: ::c_int = 0x1000;
1029+
pub const STATX_ATTR_MOUNT_ROOT: ::c_int = 0x2000;
1030+
pub const STATX_ATTR_VERITY: ::c_int = 0x00100000;
1031+
pub const STATX_ATTR_DAX: ::c_int = 0x00200000;
10291032

10301033
pub const SOMAXCONN: ::c_int = 4096;
10311034

0 commit comments

Comments
 (0)