Skip to content

Commit f105c14

Browse files
committed
adding MOVE_MOUNT* constants for linux to use with SYS_move_mount
syscall. close rust-lang#3387
1 parent df3f7c1 commit f105c14

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

libc-test/build.rs

+3
Original file line numberDiff line numberDiff line change
@@ -3862,6 +3862,9 @@ fn test_linux(target: &str) {
38623862
// FIXME: Requires more recent kernel headers
38633863
"HWTSTAMP_TX_ONESTEP_P2P" if musl => true, // linux v5.6+
38643864

3865+
// kernel 6.5 minimum
3866+
"MOVE_MOUNT_BENEATH" => true,
3867+
38653868
_ => false,
38663869
}
38673870
});

libc-test/semver/linux-gnu.txt

+9
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,15 @@ MOD_OFFSET
140140
MOD_STATUS
141141
MOD_TAI
142142
MOD_TIMECONST
143+
MOVE_MOUNT__MASK
144+
MOVE_MOUNT_BENEATH
145+
MOVE_MOUNT_F_AUTOMOUNTS
146+
MOVE_MOUNT_F_EMPTY_PATH
147+
MOVE_MOUNT_F_SYMLINKS
148+
MOVE_MOUNT_SET_GROUP
149+
MOVE_MOUNT_T_AUTOMOUNTS
150+
MOVE_MOUNT_T_EMPTY_PATH
151+
MOVE_MOUNT_T_SYMLINKS
143152
MPOL_BIND
144153
MPOL_DEFAULT
145154
MPOL_F_NUMA_BALANCING

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

+12-1
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,18 @@ pub const STATX_ATTR_DAX: ::c_int = 0x00200000;
10291029

10301030
pub const SOMAXCONN: ::c_int = 4096;
10311031

1032-
//sys/timex.h
1032+
// linux/mount.h
1033+
pub const MOVE_MOUNT_F_SYMLINKS: ::c_uint = 0x00000001;
1034+
pub const MOVE_MOUNT_F_AUTOMOUNTS: ::c_uint = 0x00000002;
1035+
pub const MOVE_MOUNT_F_EMPTY_PATH: ::c_uint = 0x00000004;
1036+
pub const MOVE_MOUNT_T_SYMLINKS: ::c_uint = 0x00000010;
1037+
pub const MOVE_MOUNT_T_AUTOMOUNTS: ::c_uint = 0x00000020;
1038+
pub const MOVE_MOUNT_T_EMPTY_PATH: ::c_uint = 0x00000040;
1039+
pub const MOVE_MOUNT_SET_GROUP: ::c_uint = 0x00000100;
1040+
pub const MOVE_MOUNT_BENEATH: ::c_uint = 0x00000200;
1041+
pub const MOVE_MOUNT__MASK: ::c_uint = 0x00000377;
1042+
1043+
// sys/timex.h
10331044
pub const ADJ_OFFSET: ::c_uint = 0x0001;
10341045
pub const ADJ_FREQUENCY: ::c_uint = 0x0002;
10351046
pub const ADJ_MAXERROR: ::c_uint = 0x0004;

0 commit comments

Comments
 (0)