Skip to content

Commit 77a5c7e

Browse files
committed
Auto merge of #3391 - devnexen:move_mount_consts, r=JohnTitor
adding MOVE_MOUNT* constants for linux to use with SYS_move_mount syscall. close #3387
2 parents 4883c82 + 0cab9f4 commit 77a5c7e

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

libc-test/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3873,6 +3873,9 @@ fn test_linux(target: &str) {
38733873
// FIXME: Requires more recent kernel headers
38743874
"HWTSTAMP_TX_ONESTEP_P2P" if musl => true, // linux v5.6+
38753875

3876+
// kernel 6.5 minimum
3877+
"MOVE_MOUNT_BENEATH" => true,
3878+
38763879
_ => false,
38773880
}
38783881
});

libc-test/semver/linux-gnu.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,14 @@ MOD_OFFSET
140140
MOD_STATUS
141141
MOD_TAI
142142
MOD_TIMECONST
143+
MOVE_MOUNT_BENEATH
144+
MOVE_MOUNT_F_AUTOMOUNTS
145+
MOVE_MOUNT_F_EMPTY_PATH
146+
MOVE_MOUNT_F_SYMLINKS
147+
MOVE_MOUNT_SET_GROUP
148+
MOVE_MOUNT_T_AUTOMOUNTS
149+
MOVE_MOUNT_T_EMPTY_PATH
150+
MOVE_MOUNT_T_SYMLINKS
143151
MPOL_BIND
144152
MPOL_DEFAULT
145153
MPOL_F_NUMA_BALANCING

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,17 @@ 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+
1042+
// sys/timex.h
10331043
pub const ADJ_OFFSET: ::c_uint = 0x0001;
10341044
pub const ADJ_FREQUENCY: ::c_uint = 0x0002;
10351045
pub const ADJ_MAXERROR: ::c_uint = 0x0004;

0 commit comments

Comments
 (0)