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 _UAPI_LINUX_AUTO_FS_H |
| 20 | #define _UAPI_LINUX_AUTO_FS_H |
| 21 | #include <linux/types.h> |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 22 | #include <linux/limits.h> |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 23 | #include <sys/ioctl.h> |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 24 | #define AUTOFS_PROTO_VERSION 5 |
| 25 | #define AUTOFS_MIN_PROTO_VERSION 3 |
| 26 | #define AUTOFS_MAX_PROTO_VERSION 5 |
Christopher Ferris | 24f97eb | 2019-05-20 12:58:13 -0700 | [diff] [blame] | 27 | #define AUTOFS_PROTO_SUBVERSION 5 |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 28 | #if defined(__ia64__) || defined(__alpha__) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 29 | typedef unsigned long autofs_wqt_t; |
| 30 | #else |
| 31 | typedef unsigned int autofs_wqt_t; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 32 | #endif |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 33 | #define autofs_ptype_missing 0 |
| 34 | #define autofs_ptype_expire 1 |
| 35 | struct autofs_packet_hdr { |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 36 | int proto_version; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 37 | int type; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 38 | }; |
| 39 | struct autofs_packet_missing { |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 40 | struct autofs_packet_hdr hdr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 41 | autofs_wqt_t wait_queue_token; |
| 42 | int len; |
| 43 | char name[NAME_MAX + 1]; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 44 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 45 | struct autofs_packet_expire { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 46 | struct autofs_packet_hdr hdr; |
| 47 | int len; |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 48 | char name[NAME_MAX + 1]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 49 | }; |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 50 | #define AUTOFS_IOCTL 0x93 |
| 51 | enum { |
| 52 | AUTOFS_IOC_READY_CMD = 0x60, |
| 53 | AUTOFS_IOC_FAIL_CMD, |
| 54 | AUTOFS_IOC_CATATONIC_CMD, |
| 55 | AUTOFS_IOC_PROTOVER_CMD, |
| 56 | AUTOFS_IOC_SETTIMEOUT_CMD, |
| 57 | AUTOFS_IOC_EXPIRE_CMD, |
| 58 | }; |
| 59 | #define AUTOFS_IOC_READY _IO(AUTOFS_IOCTL, AUTOFS_IOC_READY_CMD) |
| 60 | #define AUTOFS_IOC_FAIL _IO(AUTOFS_IOCTL, AUTOFS_IOC_FAIL_CMD) |
| 61 | #define AUTOFS_IOC_CATATONIC _IO(AUTOFS_IOCTL, AUTOFS_IOC_CATATONIC_CMD) |
| 62 | #define AUTOFS_IOC_PROTOVER _IOR(AUTOFS_IOCTL, AUTOFS_IOC_PROTOVER_CMD, int) |
| 63 | #define AUTOFS_IOC_SETTIMEOUT32 _IOWR(AUTOFS_IOCTL, AUTOFS_IOC_SETTIMEOUT_CMD, compat_ulong_t) |
| 64 | #define AUTOFS_IOC_SETTIMEOUT _IOWR(AUTOFS_IOCTL, AUTOFS_IOC_SETTIMEOUT_CMD, unsigned long) |
| 65 | #define AUTOFS_IOC_EXPIRE _IOR(AUTOFS_IOCTL, AUTOFS_IOC_EXPIRE_CMD, struct autofs_packet_expire) |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 66 | #define AUTOFS_EXP_NORMAL 0x00 |
| 67 | #define AUTOFS_EXP_IMMEDIATE 0x01 |
| 68 | #define AUTOFS_EXP_LEAVES 0x02 |
| 69 | #define AUTOFS_EXP_FORCED 0x04 |
| 70 | #define AUTOFS_TYPE_ANY 0U |
| 71 | #define AUTOFS_TYPE_INDIRECT 1U |
| 72 | #define AUTOFS_TYPE_DIRECT 2U |
| 73 | #define AUTOFS_TYPE_OFFSET 4U |
| 74 | enum autofs_notify { |
| 75 | NFY_NONE, |
| 76 | NFY_MOUNT, |
| 77 | NFY_EXPIRE |
| 78 | }; |
| 79 | #define autofs_ptype_expire_multi 2 |
| 80 | #define autofs_ptype_missing_indirect 3 |
| 81 | #define autofs_ptype_expire_indirect 4 |
| 82 | #define autofs_ptype_missing_direct 5 |
| 83 | #define autofs_ptype_expire_direct 6 |
| 84 | struct autofs_packet_expire_multi { |
| 85 | struct autofs_packet_hdr hdr; |
| 86 | autofs_wqt_t wait_queue_token; |
| 87 | int len; |
| 88 | char name[NAME_MAX + 1]; |
| 89 | }; |
| 90 | union autofs_packet_union { |
| 91 | struct autofs_packet_hdr hdr; |
| 92 | struct autofs_packet_missing missing; |
| 93 | struct autofs_packet_expire expire; |
| 94 | struct autofs_packet_expire_multi expire_multi; |
| 95 | }; |
| 96 | struct autofs_v5_packet { |
| 97 | struct autofs_packet_hdr hdr; |
| 98 | autofs_wqt_t wait_queue_token; |
| 99 | __u32 dev; |
| 100 | __u64 ino; |
| 101 | __u32 uid; |
| 102 | __u32 gid; |
| 103 | __u32 pid; |
| 104 | __u32 tgid; |
| 105 | __u32 len; |
| 106 | char name[NAME_MAX + 1]; |
| 107 | }; |
| 108 | typedef struct autofs_v5_packet autofs_packet_missing_indirect_t; |
| 109 | typedef struct autofs_v5_packet autofs_packet_expire_indirect_t; |
| 110 | typedef struct autofs_v5_packet autofs_packet_missing_direct_t; |
| 111 | typedef struct autofs_v5_packet autofs_packet_expire_direct_t; |
| 112 | union autofs_v5_packet_union { |
| 113 | struct autofs_packet_hdr hdr; |
| 114 | struct autofs_v5_packet v5_packet; |
| 115 | autofs_packet_missing_indirect_t missing_indirect; |
| 116 | autofs_packet_expire_indirect_t expire_indirect; |
| 117 | autofs_packet_missing_direct_t missing_direct; |
| 118 | autofs_packet_expire_direct_t expire_direct; |
| 119 | }; |
| 120 | enum { |
| 121 | AUTOFS_IOC_EXPIRE_MULTI_CMD = 0x66, |
| 122 | AUTOFS_IOC_PROTOSUBVER_CMD, |
| 123 | AUTOFS_IOC_ASKUMOUNT_CMD = 0x70, |
| 124 | }; |
| 125 | #define AUTOFS_IOC_EXPIRE_MULTI _IOW(AUTOFS_IOCTL, AUTOFS_IOC_EXPIRE_MULTI_CMD, int) |
| 126 | #define AUTOFS_IOC_PROTOSUBVER _IOR(AUTOFS_IOCTL, AUTOFS_IOC_PROTOSUBVER_CMD, int) |
| 127 | #define AUTOFS_IOC_ASKUMOUNT _IOR(AUTOFS_IOCTL, AUTOFS_IOC_ASKUMOUNT_CMD, int) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 128 | #endif |