Skip to content

Commit

Permalink
Auto merge of #3391 - devnexen:move_mount_consts, r=JohnTitor
Browse files Browse the repository at this point in the history
adding MOVE_MOUNT* constants for linux to use with SYS_move_mount

syscall.

close #3387
  • Loading branch information
bors committed Oct 28, 2023
2 parents 4883c82 + 0cab9f4 commit 77a5c7e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
3 changes: 3 additions & 0 deletions libc-test/build.rs
Expand Up @@ -3873,6 +3873,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
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
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

0 comments on commit 77a5c7e

Please sign in to comment.