bitflags::bitflags! {
pub struct Flags: libc::c_uint {
const MNT_RDONLY = 0x0000_0001;
const MNT_SYNCHRONOUS = 0x0000_0002;
const MNT_NOEXEC = 0x0000_0004;
const MNT_NOSUID = 0x0000_0008;
const MNT_NODEV = 0x0000_0010;
const MNT_UNION = 0x0000_0020;
const MNT_ASYNC = 0x0000_0040;
const MNT_CPROTECT = 0x0000_0080;
const MNT_EXPORTED = 0x0000_0100;
const MNT_QUARANTINE = 0x0000_0400;
const MNT_LOCAL = 0x0000_1000;
const MNT_QUOTA = 0x0000_2000;
const MNT_ROOTFS = 0x0000_4000;
const MNT_DOVOLFS = 0x0000_8000;
const MNT_DONTBROWSE = 0x0010_0000;
const MNT_IGNORE_OWNERSHIP = 0x0020_0000;
const MNT_AUTOMOUNTED = 0x0040_0000;
const MNT_JOURNALED = 0x0080_0000;
const MNT_NOUSERXATTR = 0x0100_0000;
const MNT_DEFWRITE = 0x0200_0000;
const MNT_MULTILABEL = 0x0400_0000;
const MNT_NOATIME = 0x1000_0000;
const MNT_UPDATE = 0x0001_0000;
const MNT_NOBLOCK = 0x0002_0000;
const MNT_RELOAD = 0x0004_0000;
const MNT_FORCE = 0x0008_0000;
}
}
pub trait PartitionExt {
fn flags(&self) -> Flags;
}
#[cfg(target_os = "macos")]
impl PartitionExt for crate::Partition {
fn flags(&self) -> Flags {
Flags::from_bits_truncate(self.as_ref().raw_flags())
}
}