summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-10-09 07:12:47 +0000
committerbors <bors@rust-lang.org>2022-10-09 07:12:47 +0000
commit8dcd55656eb7abbef1d6cfeb8bad28306473fce6 (patch)
tree73677a9793d4f78c563bd0768bafed8ce3ae0254
parentf064e97b687b508e4adbaae9ef4c38e23662ad2b (diff)
parenta8c85b48e4c90c24161b5032d27eb8f73624df38 (diff)
downloadrust-libc-8dcd55656eb7abbef1d6cfeb8bad28306473fce6.tar.gz
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 */ ```
-rw-r--r--libc-test/build.rs3
-rw-r--r--libc-test/semver/linux-gnu.txt3
-rw-r--r--src/unix/linux_like/linux/gnu/mod.rs3
3 files changed, 9 insertions, 0 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index 3611ae0923..2fc7cc4540 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -3313,6 +3313,9 @@ fn test_linux(target: &str) {
| "IFLA_ALT_IFNAME"
| "IFLA_PERM_ADDRESS"
| "IFLA_PROTO_DOWN_REASON"
+ | "STATX_ATTR_MOUNT_ROOT"
+ | "STATX_ATTR_VERITY"
+ | "STATX_ATTR_DAX"
if sparc64 => true,
// Added in Linux 5.13
"PTRACE_GET_RSEQ_CONFIGURATION" if sparc64 => true,
diff --git a/libc-test/semver/linux-gnu.txt b/libc-test/semver/linux-gnu.txt
index 3ad582e210..6b43d6202b 100644
--- a/libc-test/semver/linux-gnu.txt
+++ b/libc-test/semver/linux-gnu.txt
@@ -424,6 +424,9 @@ STATX_ATTR_COMPRESSED
STATX_ATTR_ENCRYPTED
STATX_ATTR_IMMUTABLE
STATX_ATTR_NODUMP
+STATX_ATTR_MOUNT_ROOT
+STATX_ATTR_VERITY
+STATX_ATTR_DAX
STATX_BASIC_STATS
STATX_BLOCKS
STATX_BTIME
diff --git a/src/unix/linux_like/linux/gnu/mod.rs b/src/unix/linux_like/linux/gnu/mod.rs
index b582e706a9..21e7619db5 100644
--- a/src/unix/linux_like/linux/gnu/mod.rs
+++ b/src/unix/linux_like/linux/gnu/mod.rs
@@ -1026,6 +1026,9 @@ pub const STATX_ATTR_APPEND: ::c_int = 0x0020;
pub const STATX_ATTR_NODUMP: ::c_int = 0x0040;
pub const STATX_ATTR_ENCRYPTED: ::c_int = 0x0800;
pub const STATX_ATTR_AUTOMOUNT: ::c_int = 0x1000;
+pub const STATX_ATTR_MOUNT_ROOT: ::c_int = 0x2000;
+pub const STATX_ATTR_VERITY: ::c_int = 0x00100000;
+pub const STATX_ATTR_DAX: ::c_int = 0x00200000;
pub const SOMAXCONN: ::c_int = 4096;