Skip to content
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

adding MOVE_MOUNT* constants for linux to use with SYS_move_mount #3391

Merged
merged 1 commit into from
Oct 28, 2023
Merged
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
3 changes: 3 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3862,6 +3862,9 @@ fn test_linux(target: &str) {
// FIXME: Requires more recent kernel headers
"HWTSTAMP_TX_ONESTEP_P2P" if musl => true, // linux v5.6+

// kernel 6.5 minimum
"MOVE_MOUNT_BENEATH" => true,

_ => false,
}
});
Expand Down
8 changes: 8 additions & 0 deletions libc-test/semver/linux-gnu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,14 @@ MOD_OFFSET
MOD_STATUS
MOD_TAI
MOD_TIMECONST
MOVE_MOUNT_BENEATH
MOVE_MOUNT_F_AUTOMOUNTS
MOVE_MOUNT_F_EMPTY_PATH
MOVE_MOUNT_F_SYMLINKS
MOVE_MOUNT_SET_GROUP
MOVE_MOUNT_T_AUTOMOUNTS
MOVE_MOUNT_T_EMPTY_PATH
MOVE_MOUNT_T_SYMLINKS
MPOL_BIND
MPOL_DEFAULT
MPOL_F_NUMA_BALANCING
Expand Down
12 changes: 11 additions & 1 deletion src/unix/linux_like/linux/gnu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,17 @@ pub const STATX_ATTR_DAX: ::c_int = 0x00200000;

pub const SOMAXCONN: ::c_int = 4096;

//sys/timex.h
// linux/mount.h
pub const MOVE_MOUNT_F_SYMLINKS: ::c_uint = 0x00000001;
pub const MOVE_MOUNT_F_AUTOMOUNTS: ::c_uint = 0x00000002;
pub const MOVE_MOUNT_F_EMPTY_PATH: ::c_uint = 0x00000004;
pub const MOVE_MOUNT_T_SYMLINKS: ::c_uint = 0x00000010;
pub const MOVE_MOUNT_T_AUTOMOUNTS: ::c_uint = 0x00000020;
pub const MOVE_MOUNT_T_EMPTY_PATH: ::c_uint = 0x00000040;
pub const MOVE_MOUNT_SET_GROUP: ::c_uint = 0x00000100;
pub const MOVE_MOUNT_BENEATH: ::c_uint = 0x00000200;

// sys/timex.h
pub const ADJ_OFFSET: ::c_uint = 0x0001;
pub const ADJ_FREQUENCY: ::c_uint = 0x0002;
pub const ADJ_MAXERROR: ::c_uint = 0x0004;
Expand Down