Skip to content

Commit

Permalink
linux-types: Add umount() flags
Browse files Browse the repository at this point in the history
  • Loading branch information
XuShaohua committed Aug 3, 2024
1 parent 08ec319 commit bdac622
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/platform/linux-types/linux/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,29 @@ pub struct file_handle_t {
pub handle_bytes: u32,
pub handle_type: i32,
/// file identifier
/// FIXME(Shaohua): Replace with a pointer
pub f_handle: [u8; 0],
}

/// Umount options
/// Attempt to forcibily umount
pub const MNT_FORCE: u32 = 0x0000_0001;
/// Just detach from the tree
pub const MNT_DETACH: u32 = 0x0000_0002;
/// Mark for expiry
pub const MNT_EXPIRE: u32 = 0x0000_0004;
/// Don't follow symlink on umount
pub const UMOUNT_NOFOLLOW: u32 = 0x0000_0008;
/// Flag guaranteed to be unused
pub const UMOUNT_UNUSED: u32 = 0x8000_0000;

#[cfg(test)]
mod tests {
use std::mem::size_of;

use super::file_handle_t;

#[test]
fn test_size_of_file_handle() {
assert_eq!(size_of::<file_handle_t>(), 8);
}
}

0 comments on commit bdac622

Please sign in to comment.