Skip to main content

libc/new/linux_uapi/linux/
mount.rs

1//! Header: `uapi/linux/mount.h`
2
3use crate::prelude::*;
4
5pub const MS_RMT_MASK: c_ulong = crate::MS_RDONLY
6    | crate::MS_SYNCHRONOUS
7    | crate::MS_MANDLOCK
8    | crate::MS_I_VERSION
9    | crate::MS_LAZYTIME;
10
11pub const OPEN_TREE_CLONE: c_uint = 0x01;
12pub const OPEN_TREE_NAMESPACE: c_uint = 0x02;
13pub const OPEN_TREE_CLOEXEC: c_uint = crate::O_CLOEXEC as c_uint;
14
15pub const MOVE_MOUNT_F_SYMLINKS: c_uint = 0x00000001;
16pub const MOVE_MOUNT_F_AUTOMOUNTS: c_uint = 0x00000002;
17pub const MOVE_MOUNT_F_EMPTY_PATH: c_uint = 0x00000004;
18pub const MOVE_MOUNT_T_SYMLINKS: c_uint = 0x00000010;
19pub const MOVE_MOUNT_T_AUTOMOUNTS: c_uint = 0x00000020;
20pub const MOVE_MOUNT_T_EMPTY_PATH: c_uint = 0x00000040;
21pub const MOVE_MOUNT_SET_GROUP: c_uint = 0x00000100;
22pub const MOVE_MOUNT_BENEATH: c_uint = 0x00000200;
23
24pub const FSOPEN_CLOEXEC: c_uint = 0x00000001;
25
26pub const FSPICK_CLOEXEC: c_uint = 0x00000001;
27pub const FSPICK_SYMLINK_NOFOLLOW: c_uint = 0x00000002;
28pub const FSPICK_NO_AUTOMOUNT: c_uint = 0x00000004;
29pub const FSPICK_EMPTY_PATH: c_uint = 0x00000008;
30
31c_enum! {
32    pub enum fsconfig_command {
33        pub FSCONFIG_SET_FLAG,
34        pub FSCONFIG_SET_STRING,
35        pub FSCONFIG_SET_BINARY,
36        pub FSCONFIG_SET_PATH,
37        pub FSCONFIG_SET_PATH_EMPTY,
38        pub FSCONFIG_SET_FD,
39        pub FSCONFIG_CMD_CREATE,
40        pub FSCONFIG_CMD_RECONFIGURE,
41        pub FSCONFIG_CMD_CREATE_EXCL,
42    }
43}
44
45pub const FSMOUNT_CLOEXEC: c_uint = 0x00000001;
46
47pub const MOUNT_ATTR_RDONLY: u64 = 0x00000001;
48pub const MOUNT_ATTR_NOSUID: u64 = 0x00000002;
49pub const MOUNT_ATTR_NODEV: u64 = 0x00000004;
50pub const MOUNT_ATTR_NOEXEC: u64 = 0x00000008;
51pub const MOUNT_ATTR__ATIME: u64 = 0x00000070;
52pub const MOUNT_ATTR_RELATIME: u64 = 0x00000000;
53pub const MOUNT_ATTR_NOATIME: u64 = 0x00000010;
54pub const MOUNT_ATTR_STRICTATIME: u64 = 0x00000020;
55pub const MOUNT_ATTR_NODIRATIME: u64 = 0x00000080;
56pub const MOUNT_ATTR_IDMAP: u64 = 0x00100000;
57pub const MOUNT_ATTR_NOSYMFOLLOW: u64 = 0x00200000;
58
59s! {
60    pub struct mount_attr {
61        pub attr_set: crate::__u64,
62        pub attr_clr: crate::__u64,
63        pub propagation: crate::__u64,
64        pub userns_fd: crate::__u64,
65    }
66}
67
68pub const MOUNT_ATTR_SIZE_VER0: c_int = 32;