Skip to content

Update statx constants and types (Linux 6.8-6.14) #4401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions libc-test/semver/linux-gnu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ STATX_ATTR_IMMUTABLE
STATX_ATTR_MOUNT_ROOT
STATX_ATTR_NODUMP
STATX_ATTR_VERITY
STATX_ATTR_WRITE_ATOMIC
STATX_BASIC_STATS
STATX_BLOCKS
STATX_BTIME
Expand All @@ -426,12 +427,15 @@ STATX_DIOALIGN
STATX_GID
STATX_INO
STATX_MNT_ID
STATX_MNT_ID_UNIQUE
STATX_MODE
STATX_MTIME
STATX_NLINK
STATX_SIZE
STATX_SUBVOL
STATX_TYPE
STATX_UID
STATX_WRITE_ATOMIC
STATX__RESERVED
STA_CLK
STA_CLOCKERR
Expand Down
13 changes: 12 additions & 1 deletion src/unix/linux_like/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,12 @@ cfg_if! {
pub stx_mnt_id: crate::__u64,
pub stx_dio_mem_align: crate::__u32,
pub stx_dio_offset_align: crate::__u32,
__statx_pad3: [crate::__u64; 12],
pub stx_subvol: crate::__u64,
pub stx_atomic_write_unit_min: crate::__u32,
pub stx_atomic_write_unit_max: crate::__u32,
pub stx_atomic_write_segments_max: crate::__u32,
pub stx_dio_read_offset_align: crate::__u32,
__statx_pad3: [crate::__u64; 9],
}

pub struct statx_timestamp {
Expand Down Expand Up @@ -1617,6 +1622,11 @@ cfg_if! {
pub const STATX_ALL: c_uint = 0x0fff;
pub const STATX_MNT_ID: c_uint = 0x1000;
pub const STATX_DIOALIGN: c_uint = 0x2000;
pub const STATX_MNT_ID_UNIQUE: c_uint = 0x4000;
pub const STATX_SUBVOL: c_uint = 0x8000;
pub const STATX_WRITE_ATOMIC: c_uint = 0x_0001_0000;
// libc-test failure. Linux 6.14 to new?
// pub const STATX_DIO_READ_ALIGN: c_uint = 0x_0002_0000;
pub const STATX__RESERVED: c_int = 0x80000000;
pub const STATX_ATTR_COMPRESSED: c_int = 0x0004;
pub const STATX_ATTR_IMMUTABLE: c_int = 0x0010;
Expand All @@ -1627,6 +1637,7 @@ cfg_if! {
pub const STATX_ATTR_MOUNT_ROOT: c_int = 0x2000;
pub const STATX_ATTR_VERITY: c_int = 0x100000;
pub const STATX_ATTR_DAX: c_int = 0x200000;
pub const STATX_ATTR_WRITE_ATOMIC: c_int = 0x400000;
}
}

Expand Down
Loading