Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 7 | #ifndef _UAPI_LINUX_MOUNT_H |
| 8 | #define _UAPI_LINUX_MOUNT_H |
Christopher Ferris | a9750ed | 2021-05-03 14:02:49 -0700 | [diff] [blame] | 9 | #include <linux/types.h> |
Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 10 | #define MS_RDONLY 1 |
| 11 | #define MS_NOSUID 2 |
| 12 | #define MS_NODEV 4 |
| 13 | #define MS_NOEXEC 8 |
| 14 | #define MS_SYNCHRONOUS 16 |
| 15 | #define MS_REMOUNT 32 |
| 16 | #define MS_MANDLOCK 64 |
| 17 | #define MS_DIRSYNC 128 |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame] | 18 | #define MS_NOSYMFOLLOW 256 |
Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 19 | #define MS_NOATIME 1024 |
| 20 | #define MS_NODIRATIME 2048 |
| 21 | #define MS_BIND 4096 |
| 22 | #define MS_MOVE 8192 |
| 23 | #define MS_REC 16384 |
| 24 | #define MS_VERBOSE 32768 |
| 25 | #define MS_SILENT 32768 |
| 26 | #define MS_POSIXACL (1 << 16) |
| 27 | #define MS_UNBINDABLE (1 << 17) |
| 28 | #define MS_PRIVATE (1 << 18) |
| 29 | #define MS_SLAVE (1 << 19) |
| 30 | #define MS_SHARED (1 << 20) |
| 31 | #define MS_RELATIME (1 << 21) |
| 32 | #define MS_KERNMOUNT (1 << 22) |
| 33 | #define MS_I_VERSION (1 << 23) |
| 34 | #define MS_STRICTATIME (1 << 24) |
| 35 | #define MS_LAZYTIME (1 << 25) |
| 36 | #define MS_SUBMOUNT (1 << 26) |
| 37 | #define MS_NOREMOTELOCK (1 << 27) |
| 38 | #define MS_NOSEC (1 << 28) |
| 39 | #define MS_BORN (1 << 29) |
| 40 | #define MS_ACTIVE (1 << 30) |
| 41 | #define MS_NOUSER (1 << 31) |
| 42 | #define MS_RMT_MASK (MS_RDONLY | MS_SYNCHRONOUS | MS_MANDLOCK | MS_I_VERSION | MS_LAZYTIME) |
| 43 | #define MS_MGC_VAL 0xC0ED0000 |
| 44 | #define MS_MGC_MSK 0xffff0000 |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 45 | #define OPEN_TREE_CLONE 1 |
| 46 | #define OPEN_TREE_CLOEXEC O_CLOEXEC |
| 47 | #define MOVE_MOUNT_F_SYMLINKS 0x00000001 |
| 48 | #define MOVE_MOUNT_F_AUTOMOUNTS 0x00000002 |
| 49 | #define MOVE_MOUNT_F_EMPTY_PATH 0x00000004 |
| 50 | #define MOVE_MOUNT_T_SYMLINKS 0x00000010 |
| 51 | #define MOVE_MOUNT_T_AUTOMOUNTS 0x00000020 |
| 52 | #define MOVE_MOUNT_T_EMPTY_PATH 0x00000040 |
Christopher Ferris | 2abfa9e | 2021-11-01 16:26:06 -0700 | [diff] [blame] | 53 | #define MOVE_MOUNT_SET_GROUP 0x00000100 |
Christopher Ferris | 8666d04 | 2023-09-06 14:55:31 -0700 | [diff] [blame] | 54 | #define MOVE_MOUNT_BENEATH 0x00000200 |
| 55 | #define MOVE_MOUNT__MASK 0x00000377 |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 56 | #define FSOPEN_CLOEXEC 0x00000001 |
| 57 | #define FSPICK_CLOEXEC 0x00000001 |
| 58 | #define FSPICK_SYMLINK_NOFOLLOW 0x00000002 |
| 59 | #define FSPICK_NO_AUTOMOUNT 0x00000004 |
| 60 | #define FSPICK_EMPTY_PATH 0x00000008 |
| 61 | enum fsconfig_command { |
| 62 | FSCONFIG_SET_FLAG = 0, |
| 63 | FSCONFIG_SET_STRING = 1, |
| 64 | FSCONFIG_SET_BINARY = 2, |
| 65 | FSCONFIG_SET_PATH = 3, |
| 66 | FSCONFIG_SET_PATH_EMPTY = 4, |
| 67 | FSCONFIG_SET_FD = 5, |
| 68 | FSCONFIG_CMD_CREATE = 6, |
| 69 | FSCONFIG_CMD_RECONFIGURE = 7, |
Christopher Ferris | 67d1e5e | 2023-10-31 13:36:37 -0700 | [diff] [blame] | 70 | FSCONFIG_CMD_CREATE_EXCL = 8, |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 71 | }; |
| 72 | #define FSMOUNT_CLOEXEC 0x00000001 |
| 73 | #define MOUNT_ATTR_RDONLY 0x00000001 |
| 74 | #define MOUNT_ATTR_NOSUID 0x00000002 |
| 75 | #define MOUNT_ATTR_NODEV 0x00000004 |
| 76 | #define MOUNT_ATTR_NOEXEC 0x00000008 |
| 77 | #define MOUNT_ATTR__ATIME 0x00000070 |
| 78 | #define MOUNT_ATTR_RELATIME 0x00000000 |
| 79 | #define MOUNT_ATTR_NOATIME 0x00000010 |
| 80 | #define MOUNT_ATTR_STRICTATIME 0x00000020 |
| 81 | #define MOUNT_ATTR_NODIRATIME 0x00000080 |
Christopher Ferris | a9750ed | 2021-05-03 14:02:49 -0700 | [diff] [blame] | 82 | #define MOUNT_ATTR_IDMAP 0x00100000 |
Christopher Ferris | 3a39c0b | 2021-09-02 00:03:38 +0000 | [diff] [blame] | 83 | #define MOUNT_ATTR_NOSYMFOLLOW 0x00200000 |
Christopher Ferris | a9750ed | 2021-05-03 14:02:49 -0700 | [diff] [blame] | 84 | struct mount_attr { |
| 85 | __u64 attr_set; |
| 86 | __u64 attr_clr; |
| 87 | __u64 propagation; |
| 88 | __u64 userns_fd; |
| 89 | }; |
| 90 | #define MOUNT_ATTR_SIZE_VER0 32 |
Christopher Ferris | b830ddf | 2024-03-28 11:48:08 -0700 | [diff] [blame] | 91 | struct statmount { |
| 92 | __u32 size; |
Christopher Ferris | 4ba5449 | 2024-09-18 16:25:22 +0000 | [diff] [blame^] | 93 | __u32 mnt_opts; |
Christopher Ferris | b830ddf | 2024-03-28 11:48:08 -0700 | [diff] [blame] | 94 | __u64 mask; |
| 95 | __u32 sb_dev_major; |
| 96 | __u32 sb_dev_minor; |
| 97 | __u64 sb_magic; |
| 98 | __u32 sb_flags; |
| 99 | __u32 fs_type; |
| 100 | __u64 mnt_id; |
| 101 | __u64 mnt_parent_id; |
| 102 | __u32 mnt_id_old; |
| 103 | __u32 mnt_parent_id_old; |
| 104 | __u64 mnt_attr; |
| 105 | __u64 mnt_propagation; |
| 106 | __u64 mnt_peer_group; |
| 107 | __u64 mnt_master; |
| 108 | __u64 propagate_from; |
| 109 | __u32 mnt_root; |
| 110 | __u32 mnt_point; |
Christopher Ferris | 4ba5449 | 2024-09-18 16:25:22 +0000 | [diff] [blame^] | 111 | __u64 mnt_ns_id; |
| 112 | __u64 __spare2[49]; |
Christopher Ferris | b830ddf | 2024-03-28 11:48:08 -0700 | [diff] [blame] | 113 | char str[]; |
| 114 | }; |
| 115 | struct mnt_id_req { |
| 116 | __u32 size; |
| 117 | __u32 spare; |
| 118 | __u64 mnt_id; |
| 119 | __u64 param; |
Christopher Ferris | 4ba5449 | 2024-09-18 16:25:22 +0000 | [diff] [blame^] | 120 | __u64 mnt_ns_id; |
Christopher Ferris | b830ddf | 2024-03-28 11:48:08 -0700 | [diff] [blame] | 121 | }; |
| 122 | #define MNT_ID_REQ_SIZE_VER0 24 |
Christopher Ferris | 4ba5449 | 2024-09-18 16:25:22 +0000 | [diff] [blame^] | 123 | #define MNT_ID_REQ_SIZE_VER1 32 |
Christopher Ferris | b830ddf | 2024-03-28 11:48:08 -0700 | [diff] [blame] | 124 | #define STATMOUNT_SB_BASIC 0x00000001U |
| 125 | #define STATMOUNT_MNT_BASIC 0x00000002U |
| 126 | #define STATMOUNT_PROPAGATE_FROM 0x00000004U |
| 127 | #define STATMOUNT_MNT_ROOT 0x00000008U |
| 128 | #define STATMOUNT_MNT_POINT 0x00000010U |
| 129 | #define STATMOUNT_FS_TYPE 0x00000020U |
Christopher Ferris | 4ba5449 | 2024-09-18 16:25:22 +0000 | [diff] [blame^] | 130 | #define STATMOUNT_MNT_NS_ID 0x00000040U |
| 131 | #define STATMOUNT_MNT_OPTS 0x00000080U |
Christopher Ferris | b830ddf | 2024-03-28 11:48:08 -0700 | [diff] [blame] | 132 | #define LSMT_ROOT 0xffffffffffffffff |
Christopher Ferris | 4ba5449 | 2024-09-18 16:25:22 +0000 | [diff] [blame^] | 133 | #define LISTMOUNT_REVERSE (1 << 0) |
Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 134 | #endif |