blob: e48555c4775df462794f43a6882499e2d80d9cc8 [file] [log] [blame]
Christopher Ferrisd842e432019-03-07 10:21:59 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_MOUNT_H
20#define _UAPI_LINUX_MOUNT_H
Christopher Ferrisa9750ed2021-05-03 14:02:49 -070021#include <linux/types.h>
Christopher Ferrisd842e432019-03-07 10:21:59 -080022#define MS_RDONLY 1
23#define MS_NOSUID 2
24#define MS_NODEV 4
25#define MS_NOEXEC 8
26#define MS_SYNCHRONOUS 16
27#define MS_REMOUNT 32
28#define MS_MANDLOCK 64
29#define MS_DIRSYNC 128
Christopher Ferris32ff3f82020-12-14 13:10:04 -080030#define MS_NOSYMFOLLOW 256
Christopher Ferrisd842e432019-03-07 10:21:59 -080031#define MS_NOATIME 1024
32#define MS_NODIRATIME 2048
33#define MS_BIND 4096
34#define MS_MOVE 8192
35#define MS_REC 16384
36#define MS_VERBOSE 32768
37#define MS_SILENT 32768
38#define MS_POSIXACL (1 << 16)
39#define MS_UNBINDABLE (1 << 17)
40#define MS_PRIVATE (1 << 18)
41#define MS_SLAVE (1 << 19)
42#define MS_SHARED (1 << 20)
43#define MS_RELATIME (1 << 21)
44#define MS_KERNMOUNT (1 << 22)
45#define MS_I_VERSION (1 << 23)
46#define MS_STRICTATIME (1 << 24)
47#define MS_LAZYTIME (1 << 25)
48#define MS_SUBMOUNT (1 << 26)
49#define MS_NOREMOTELOCK (1 << 27)
50#define MS_NOSEC (1 << 28)
51#define MS_BORN (1 << 29)
52#define MS_ACTIVE (1 << 30)
53#define MS_NOUSER (1 << 31)
54#define MS_RMT_MASK (MS_RDONLY | MS_SYNCHRONOUS | MS_MANDLOCK | MS_I_VERSION | MS_LAZYTIME)
55#define MS_MGC_VAL 0xC0ED0000
56#define MS_MGC_MSK 0xffff0000
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070057#define OPEN_TREE_CLONE 1
58#define OPEN_TREE_CLOEXEC O_CLOEXEC
59#define MOVE_MOUNT_F_SYMLINKS 0x00000001
60#define MOVE_MOUNT_F_AUTOMOUNTS 0x00000002
61#define MOVE_MOUNT_F_EMPTY_PATH 0x00000004
62#define MOVE_MOUNT_T_SYMLINKS 0x00000010
63#define MOVE_MOUNT_T_AUTOMOUNTS 0x00000020
64#define MOVE_MOUNT_T_EMPTY_PATH 0x00000040
Christopher Ferris2abfa9e2021-11-01 16:26:06 -070065#define MOVE_MOUNT_SET_GROUP 0x00000100
Christopher Ferris8666d042023-09-06 14:55:31 -070066#define MOVE_MOUNT_BENEATH 0x00000200
67#define MOVE_MOUNT__MASK 0x00000377
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070068#define FSOPEN_CLOEXEC 0x00000001
69#define FSPICK_CLOEXEC 0x00000001
70#define FSPICK_SYMLINK_NOFOLLOW 0x00000002
71#define FSPICK_NO_AUTOMOUNT 0x00000004
72#define FSPICK_EMPTY_PATH 0x00000008
73enum fsconfig_command {
74 FSCONFIG_SET_FLAG = 0,
75 FSCONFIG_SET_STRING = 1,
76 FSCONFIG_SET_BINARY = 2,
77 FSCONFIG_SET_PATH = 3,
78 FSCONFIG_SET_PATH_EMPTY = 4,
79 FSCONFIG_SET_FD = 5,
80 FSCONFIG_CMD_CREATE = 6,
81 FSCONFIG_CMD_RECONFIGURE = 7,
Christopher Ferris67d1e5e2023-10-31 13:36:37 -070082 FSCONFIG_CMD_CREATE_EXCL = 8,
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070083};
84#define FSMOUNT_CLOEXEC 0x00000001
85#define MOUNT_ATTR_RDONLY 0x00000001
86#define MOUNT_ATTR_NOSUID 0x00000002
87#define MOUNT_ATTR_NODEV 0x00000004
88#define MOUNT_ATTR_NOEXEC 0x00000008
89#define MOUNT_ATTR__ATIME 0x00000070
90#define MOUNT_ATTR_RELATIME 0x00000000
91#define MOUNT_ATTR_NOATIME 0x00000010
92#define MOUNT_ATTR_STRICTATIME 0x00000020
93#define MOUNT_ATTR_NODIRATIME 0x00000080
Christopher Ferrisa9750ed2021-05-03 14:02:49 -070094#define MOUNT_ATTR_IDMAP 0x00100000
Christopher Ferris3a39c0b2021-09-02 00:03:38 +000095#define MOUNT_ATTR_NOSYMFOLLOW 0x00200000
Christopher Ferrisa9750ed2021-05-03 14:02:49 -070096struct mount_attr {
97 __u64 attr_set;
98 __u64 attr_clr;
99 __u64 propagation;
100 __u64 userns_fd;
101};
102#define MOUNT_ATTR_SIZE_VER0 32
Christopher Ferrisd842e432019-03-07 10:21:59 -0800103#endif