Skip to content

Commit

Permalink
Do some todos (#1092)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
primoly and sunfishcode authored Aug 26, 2024
1 parent 7bc53a7 commit a01a716
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/backend/libc/mount/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,8 @@ bitflags! {
/// `MOVE_MOUNT__MASK`
const MOVE_MOUNT_SET_GROUP = 0x0000_0100;

// TODO: add when Linux 6.5 is released
// /// `MOVE_MOUNT_BENEATH`
// const MOVE_MOUNT_BENEATH = 0x0000_0200;
/// `MOVE_MOUNT_BENEATH` (since Linux 6.5)
const MOVE_MOUNT_BENEATH = 0x0000_0200;

/// `MOVE_MOUNT__MASK`
const MOVE_MOUNT__MASK = 0x0000_0377;
Expand Down
3 changes: 3 additions & 0 deletions src/backend/linux_raw/c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,3 +320,6 @@ pub(crate) use reboot_symbols::*;

// TODO: This is new in Linux 6.11; remove when linux-raw-sys is updated.
pub(crate) const MAP_DROPPABLE: u32 = 0x8;

// TODO: This is new in Linux 6.5; remove when linux-raw-sys is updated.
pub(crate) const MOVE_MOUNT_BENEATH: u32 = 0x200;
5 changes: 2 additions & 3 deletions src/backend/linux_raw/mount/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,8 @@ bitflags! {
/// `MOVE_MOUNT__MASK`
const MOVE_MOUNT_SET_GROUP = linux_raw_sys::general::MOVE_MOUNT_SET_GROUP;

// TODO: add when Linux 6.5 is released
// /// `MOVE_MOUNT_BENEATH`
// const MOVE_MOUNT_BENEATH = linux_raw_sys::general::MOVE_MOUNT_BENEATH;
/// `MOVE_MOUNT_BENEATH` (since Linux 6.5)
const MOVE_MOUNT_BENEATH = c::MOVE_MOUNT_BENEATH;

/// `MOVE_MOUNT__MASK`
const MOVE_MOUNT__MASK = linux_raw_sys::general::MOVE_MOUNT__MASK;
Expand Down

0 comments on commit a01a716

Please sign in to comment.