Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 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 _LINUX_AUTO_FS4_H |
| 20 | #define _LINUX_AUTO_FS4_H |
| 21 | #include <linux/types.h> |
| 22 | #include <linux/auto_fs.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #undef AUTOFS_PROTO_VERSION |
| 24 | #undef AUTOFS_MIN_PROTO_VERSION |
| 25 | #undef AUTOFS_MAX_PROTO_VERSION |
| 26 | #define AUTOFS_PROTO_VERSION 5 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define AUTOFS_MIN_PROTO_VERSION 3 |
| 28 | #define AUTOFS_MAX_PROTO_VERSION 5 |
| 29 | #define AUTOFS_PROTO_SUBVERSION 2 |
| 30 | #define AUTOFS_EXP_IMMEDIATE 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | #define AUTOFS_EXP_LEAVES 2 |
| 32 | #define AUTOFS_TYPE_ANY 0U |
| 33 | #define AUTOFS_TYPE_INDIRECT 1U |
| 34 | #define AUTOFS_TYPE_DIRECT 2U |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 35 | #define AUTOFS_TYPE_OFFSET 4U |
| 36 | enum autofs_notify { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 37 | NFY_NONE, |
| 38 | NFY_MOUNT, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | NFY_EXPIRE |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 40 | }; |
| 41 | #define autofs_ptype_expire_multi 2 |
| 42 | #define autofs_ptype_missing_indirect 3 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | #define autofs_ptype_expire_indirect 4 |
| 44 | #define autofs_ptype_missing_direct 5 |
| 45 | #define autofs_ptype_expire_direct 6 |
| 46 | struct autofs_packet_expire_multi { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | struct autofs_packet_hdr hdr; |
| 48 | autofs_wqt_t wait_queue_token; |
| 49 | int len; |
| 50 | char name[NAME_MAX + 1]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 51 | }; |
| 52 | union autofs_packet_union { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 53 | struct autofs_packet_hdr hdr; |
| 54 | struct autofs_packet_missing missing; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 | struct autofs_packet_expire expire; |
| 56 | struct autofs_packet_expire_multi expire_multi; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 57 | }; |
| 58 | struct autofs_v5_packet { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 | struct autofs_packet_hdr hdr; |
| 60 | autofs_wqt_t wait_queue_token; |
| 61 | __u32 dev; |
| 62 | __u64 ino; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 63 | __u32 uid; |
| 64 | __u32 gid; |
| 65 | __u32 pid; |
| 66 | __u32 tgid; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 | __u32 len; |
| 68 | char name[NAME_MAX + 1]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 69 | }; |
| 70 | typedef struct autofs_v5_packet autofs_packet_missing_indirect_t; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 71 | typedef struct autofs_v5_packet autofs_packet_expire_indirect_t; |
| 72 | typedef struct autofs_v5_packet autofs_packet_missing_direct_t; |
| 73 | typedef struct autofs_v5_packet autofs_packet_expire_direct_t; |
| 74 | union autofs_v5_packet_union { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 75 | struct autofs_packet_hdr hdr; |
| 76 | struct autofs_v5_packet v5_packet; |
| 77 | autofs_packet_missing_indirect_t missing_indirect; |
| 78 | autofs_packet_expire_indirect_t expire_indirect; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 | autofs_packet_missing_direct_t missing_direct; |
| 80 | autofs_packet_expire_direct_t expire_direct; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 81 | }; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 82 | enum { |
| 83 | AUTOFS_IOC_EXPIRE_MULTI_CMD = 0x66, |
| 84 | AUTOFS_IOC_PROTOSUBVER_CMD, |
| 85 | AUTOFS_IOC_ASKUMOUNT_CMD = 0x70, |
| 86 | }; |
| 87 | #define AUTOFS_IOC_EXPIRE_MULTI _IOW(AUTOFS_IOCTL, AUTOFS_IOC_EXPIRE_MULTI_CMD, int) |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 88 | #define AUTOFS_IOC_PROTOSUBVER _IOR(AUTOFS_IOCTL, AUTOFS_IOC_PROTOSUBVER_CMD, int) |
| 89 | #define AUTOFS_IOC_ASKUMOUNT _IOR(AUTOFS_IOCTL, AUTOFS_IOC_ASKUMOUNT_CMD, int) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 90 | #endif |