use crate::backend::c;
use bitflags::bitflags;
bitflags! {
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
pub struct MountFlags: c::c_uint {
const BIND = linux_raw_sys::general::MS_BIND;
const DIRSYNC = linux_raw_sys::general::MS_DIRSYNC;
const LAZYTIME = linux_raw_sys::general::MS_LAZYTIME;
#[doc(alias = "MANDLOCK")]
const PERMIT_MANDATORY_FILE_LOCKING = linux_raw_sys::general::MS_MANDLOCK;
const NOATIME = linux_raw_sys::general::MS_NOATIME;
const NODEV = linux_raw_sys::general::MS_NODEV;
const NODIRATIME = linux_raw_sys::general::MS_NODIRATIME;
const NOEXEC = linux_raw_sys::general::MS_NOEXEC;
const NOSUID = linux_raw_sys::general::MS_NOSUID;
const RDONLY = linux_raw_sys::general::MS_RDONLY;
const REC = linux_raw_sys::general::MS_REC;
const RELATIME = linux_raw_sys::general::MS_RELATIME;
const SILENT = linux_raw_sys::general::MS_SILENT;
const STRICTATIME = linux_raw_sys::general::MS_STRICTATIME;
const SYNCHRONOUS = linux_raw_sys::general::MS_SYNCHRONOUS;
const NOSYMFOLLOW = linux_raw_sys::general::MS_NOSYMFOLLOW;
const _ = !0;
}
}
bitflags! {
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
pub struct UnmountFlags: c::c_uint {
const FORCE = linux_raw_sys::general::MNT_FORCE;
const DETACH = linux_raw_sys::general::MNT_DETACH;
const EXPIRE = linux_raw_sys::general::MNT_EXPIRE;
const NOFOLLOW = linux_raw_sys::general::UMOUNT_NOFOLLOW;
const _ = !0;
}
}
#[cfg(feature = "mount")]
bitflags! {
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
pub struct FsOpenFlags: c::c_uint {
const FSOPEN_CLOEXEC = linux_raw_sys::general::FSOPEN_CLOEXEC;
const _ = !0;
}
}
#[cfg(feature = "mount")]
bitflags! {
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
pub struct FsMountFlags: c::c_uint {
const FSMOUNT_CLOEXEC = linux_raw_sys::general::FSMOUNT_CLOEXEC;
const _ = !0;
}
}
#[cfg(feature = "mount")]
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
#[repr(u32)]
pub(crate) enum FsConfigCmd {
SetFlag = linux_raw_sys::general::fsconfig_command::FSCONFIG_SET_FLAG as u32,
SetString = linux_raw_sys::general::fsconfig_command::FSCONFIG_SET_STRING as u32,
SetBinary = linux_raw_sys::general::fsconfig_command::FSCONFIG_SET_BINARY as u32,
SetPath = linux_raw_sys::general::fsconfig_command::FSCONFIG_SET_PATH as u32,
SetPathEmpty = linux_raw_sys::general::fsconfig_command::FSCONFIG_SET_PATH_EMPTY as u32,
SetFd = linux_raw_sys::general::fsconfig_command::FSCONFIG_SET_FD as u32,
Create = linux_raw_sys::general::fsconfig_command::FSCONFIG_CMD_CREATE as u32,
Reconfigure = linux_raw_sys::general::fsconfig_command::FSCONFIG_CMD_RECONFIGURE as u32,
}
#[cfg(feature = "mount")]
bitflags! {
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
pub struct MountAttrFlags: c::c_uint {
const MOUNT_ATTR_RDONLY = linux_raw_sys::general::MOUNT_ATTR_RDONLY;
const MOUNT_ATTR_NOSUID = linux_raw_sys::general::MOUNT_ATTR_NOSUID;
const MOUNT_ATTR_NODEV = linux_raw_sys::general::MOUNT_ATTR_NODEV;
const MOUNT_ATTR_NOEXEC = linux_raw_sys::general::MOUNT_ATTR_NOEXEC;
const MOUNT_ATTR__ATIME = linux_raw_sys::general::MOUNT_ATTR__ATIME;
const MOUNT_ATTR_RELATIME = linux_raw_sys::general::MOUNT_ATTR_RELATIME;
const MOUNT_ATTR_NOATIME = linux_raw_sys::general::MOUNT_ATTR_NOATIME;
const MOUNT_ATTR_STRICTATIME = linux_raw_sys::general::MOUNT_ATTR_STRICTATIME;
const MOUNT_ATTR_NODIRATIME = linux_raw_sys::general::MOUNT_ATTR_NODIRATIME;
const MOUNT_ATTR_IDMAP = linux_raw_sys::general::MOUNT_ATTR_IDMAP;
const MOUNT_ATTR_NOSYMFOLLOW = linux_raw_sys::general::MOUNT_ATTR_NOSYMFOLLOW;
const MOUNT_ATTR_SIZE_VER0 = linux_raw_sys::general::MOUNT_ATTR_SIZE_VER0;
const _ = !0;
}
}
#[cfg(feature = "mount")]
bitflags! {
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
pub struct MoveMountFlags: c::c_uint {
const MOVE_MOUNT_F_SYMLINKS = linux_raw_sys::general::MOVE_MOUNT_F_SYMLINKS;
const MOVE_MOUNT_F_AUTOMOUNTS = linux_raw_sys::general::MOVE_MOUNT_F_AUTOMOUNTS;
const MOVE_MOUNT_F_EMPTY_PATH = linux_raw_sys::general::MOVE_MOUNT_F_EMPTY_PATH;
const MOVE_MOUNT_T_SYMLINKS = linux_raw_sys::general::MOVE_MOUNT_T_SYMLINKS;
const MOVE_MOUNT_T_AUTOMOUNTS = linux_raw_sys::general::MOVE_MOUNT_T_AUTOMOUNTS;
const MOVE_MOUNT_T_EMPTY_PATH = linux_raw_sys::general::MOVE_MOUNT_T_EMPTY_PATH;
const MOVE_MOUNT_SET_GROUP = linux_raw_sys::general::MOVE_MOUNT_SET_GROUP;
const MOVE_MOUNT__MASK = linux_raw_sys::general::MOVE_MOUNT__MASK;
const _ = !0;
}
}
#[cfg(feature = "mount")]
bitflags! {
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
pub struct OpenTreeFlags: c::c_uint {
const OPEN_TREE_CLONE = linux_raw_sys::general::OPEN_TREE_CLONE;
const OPEN_TREE_CLOEXEC = linux_raw_sys::general::OPEN_TREE_CLOEXEC;
const AT_EMPTY_PATH = linux_raw_sys::general::AT_EMPTY_PATH;
const AT_NO_AUTOMOUNT = linux_raw_sys::general::AT_NO_AUTOMOUNT;
const AT_RECURSIVE = linux_raw_sys::general::AT_RECURSIVE;
const AT_SYMLINK_NOFOLLOW = linux_raw_sys::general::AT_SYMLINK_NOFOLLOW;
const _ = !0;
}
}
#[cfg(feature = "mount")]
bitflags! {
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
pub struct FsPickFlags: c::c_uint {
const FSPICK_CLOEXEC = linux_raw_sys::general::FSPICK_CLOEXEC;
const FSPICK_SYMLINK_NOFOLLOW = linux_raw_sys::general::FSPICK_SYMLINK_NOFOLLOW;
const FSPICK_NO_AUTOMOUNT = linux_raw_sys::general::FSPICK_NO_AUTOMOUNT;
const FSPICK_EMPTY_PATH = linux_raw_sys::general::FSPICK_EMPTY_PATH;
const _ = !0;
}
}
bitflags! {
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
pub struct MountPropagationFlags: c::c_uint {
const SILENT = linux_raw_sys::general::MS_SILENT;
const SHARED = linux_raw_sys::general::MS_SHARED;
const PRIVATE = linux_raw_sys::general::MS_PRIVATE;
const SLAVE = linux_raw_sys::general::MS_SLAVE;
const UNBINDABLE = linux_raw_sys::general::MS_UNBINDABLE;
const REC = linux_raw_sys::general::MS_REC;
const _ = !0;
}
}
bitflags! {
#[repr(transparent)]
#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
pub(crate) struct InternalMountFlags: c::c_uint {
const REMOUNT = linux_raw_sys::general::MS_REMOUNT;
const MOVE = linux_raw_sys::general::MS_MOVE;
const _ = !0;
}
}
#[repr(transparent)]
pub(crate) struct MountFlagsArg(pub(crate) c::c_uint);