Skip to content

Commit a01a716

Browse files
primolysunfishcode
andauthored
Do some todos (#1092)
* Do some todos * Add a `MOVE_MOUNT_BENEATH` constant to linux_raw as a temporary workaround. * Document that `MOVE_MOUNT_BENEATH` is since Linux 6.5. --------- Co-authored-by: Dan Gohman <[email protected]>
1 parent 7bc53a7 commit a01a716

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/backend/libc/mount/types.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,8 @@ bitflags! {
227227
/// `MOVE_MOUNT__MASK`
228228
const MOVE_MOUNT_SET_GROUP = 0x0000_0100;
229229

230-
// TODO: add when Linux 6.5 is released
231-
// /// `MOVE_MOUNT_BENEATH`
232-
// const MOVE_MOUNT_BENEATH = 0x0000_0200;
230+
/// `MOVE_MOUNT_BENEATH` (since Linux 6.5)
231+
const MOVE_MOUNT_BENEATH = 0x0000_0200;
233232

234233
/// `MOVE_MOUNT__MASK`
235234
const MOVE_MOUNT__MASK = 0x0000_0377;

src/backend/linux_raw/c.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,3 +320,6 @@ pub(crate) use reboot_symbols::*;
320320

321321
// TODO: This is new in Linux 6.11; remove when linux-raw-sys is updated.
322322
pub(crate) const MAP_DROPPABLE: u32 = 0x8;
323+
324+
// TODO: This is new in Linux 6.5; remove when linux-raw-sys is updated.
325+
pub(crate) const MOVE_MOUNT_BENEATH: u32 = 0x200;

src/backend/linux_raw/mount/types.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,8 @@ bitflags! {
223223
/// `MOVE_MOUNT__MASK`
224224
const MOVE_MOUNT_SET_GROUP = linux_raw_sys::general::MOVE_MOUNT_SET_GROUP;
225225

226-
// TODO: add when Linux 6.5 is released
227-
// /// `MOVE_MOUNT_BENEATH`
228-
// const MOVE_MOUNT_BENEATH = linux_raw_sys::general::MOVE_MOUNT_BENEATH;
226+
/// `MOVE_MOUNT_BENEATH` (since Linux 6.5)
227+
const MOVE_MOUNT_BENEATH = c::MOVE_MOUNT_BENEATH;
229228

230229
/// `MOVE_MOUNT__MASK`
231230
const MOVE_MOUNT__MASK = linux_raw_sys::general::MOVE_MOUNT__MASK;

0 commit comments

Comments
 (0)