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