blob: 39d1ac832c46f3dcece7a2ee47d9612ba628a152 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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 Ferris6a9755d2017-01-13 14:09:31 -080022#include <linux/limits.h>
Christopher Ferris6a9755d2017-01-13 14:09:31 -080023#include <sys/ioctl.h>
Christopher Ferris9ce28842018-10-25 12:11:39 -070024#define AUTOFS_PROTO_VERSION 5
25#define AUTOFS_MIN_PROTO_VERSION 3
26#define AUTOFS_MAX_PROTO_VERSION 5
Christopher Ferris24f97eb2019-05-20 12:58:13 -070027#define AUTOFS_PROTO_SUBVERSION 5
Christopher Ferris6a9755d2017-01-13 14:09:31 -080028#if defined(__ia64__) || defined(__alpha__)
Ben Cheng655a7c02013-10-16 16:09:24 -070029typedef unsigned long autofs_wqt_t;
30#else
31typedef unsigned int autofs_wqt_t;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080032#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070033#define autofs_ptype_missing 0
34#define autofs_ptype_expire 1
35struct autofs_packet_hdr {
Christopher Ferris6a9755d2017-01-13 14:09:31 -080036 int proto_version;
Tao Baod7db5942015-01-28 10:07:51 -080037 int type;
Ben Cheng655a7c02013-10-16 16:09:24 -070038};
39struct autofs_packet_missing {
Christopher Ferris6a9755d2017-01-13 14:09:31 -080040 struct autofs_packet_hdr hdr;
Tao Baod7db5942015-01-28 10:07:51 -080041 autofs_wqt_t wait_queue_token;
42 int len;
43 char name[NAME_MAX + 1];
Christopher Ferris6a9755d2017-01-13 14:09:31 -080044};
Ben Cheng655a7c02013-10-16 16:09:24 -070045struct autofs_packet_expire {
Tao Baod7db5942015-01-28 10:07:51 -080046 struct autofs_packet_hdr hdr;
47 int len;
Christopher Ferris6a9755d2017-01-13 14:09:31 -080048 char name[NAME_MAX + 1];
Ben Cheng655a7c02013-10-16 16:09:24 -070049};
Christopher Ferris525ce912017-07-26 13:12:53 -070050#define AUTOFS_IOCTL 0x93
51enum {
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 Ferris9ce28842018-10-25 12:11:39 -070066#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
74enum 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
84struct 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};
90union 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};
96struct 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};
108typedef struct autofs_v5_packet autofs_packet_missing_indirect_t;
109typedef struct autofs_v5_packet autofs_packet_expire_indirect_t;
110typedef struct autofs_v5_packet autofs_packet_missing_direct_t;
111typedef struct autofs_v5_packet autofs_packet_expire_direct_t;
112union 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};
120enum {
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 Cheng655a7c02013-10-16 16:09:24 -0700128#endif